borderAndreaVB free resources for Visual Basic developersborder

borderAndreaVB Visual Basic and VB.NET source code resources - Copyright © 1999-2007 Andrea Tincaniborder

AndreaVB | Forum | News | Downloads | Register | Help | Member List | Statistics | Search | PM | Profile

Print This Topic
Previous Topic (how to use inet.execute to download a file)Next Topic (How do i determine if the file exist online) New Topic New Poll Post Reply
AndreaVB Forum : Internet Applications : How to pull data from web page an insert in db
Poster Message
adi44
Level: Big Cheese

Registered: 19-01-2005
Posts: 21

icon How to pull data from web page an insert in db

Hi, what I want to do is the web page which I m able to open using Inet frm that I want to pull some data and store in database but I dont no how to remove those HTML tags.Also how to enter into a hyperlink of main page through vb..
I hope what I m asking want be confusing.please help me...

29-04-2006 at 06:27 AM
View Profile Send Email to User Show All Posts | Quote Reply
Chidaz
Level: Whizz Kid


Registered: 29-06-2006
Posts: 15
icon Re: How to pull data from web page an insert in db

Try to use Microsoft Internet Control; Press Ctrl + T and look for that componet. Insert it on your form such that when you dial up using your Inet after it establishes a connection the put the following line of code;

WebBrowser.Navigate "Your URL"

Declare a temp Variable to Store your data that you want to pull from a web page.

search for it using the following code:

Public Function CheckFileDeleted(path As String) As Boolean

wWeb.Navigate2 strExist
If WebPageContains(path) = True Then 'check if the word is in page
'   MsgBox path & " Found", vbInformation  'string is in page
   tempvar = WebPageContains
Else
   MsgBox path & " Not Found", vbCritical 'string is not in page
End If
End Function

Private Function WebPageContains(s As String) As Boolean
    Dim i, x As Long, EHTML
    
    'Get the number of all Files on the Page
    For i = 1 To wWeb.Document.All.length
         Set EHTML = _
        wWeb.Document.All.Item(i)
        'Search Thru All Files
        '---------------------
        If Not (EHTML Is Nothing) Then
            If InStr(1, EHTML.innerHTML, _
            s, vbTextCompare) > 0 Then
            WebPageContains = True 'Set WebPage to TRUE when found
            Exit Function
        End If
    End If
Next i
End Function


then you save your data into you database using tempvar.

Not tested, Hopefully it will help you to come up with the solution.

04-07-2006 at 08:25 AM
View Profile Send Email to User Show All Posts | Quote Reply
AndreaVB Forum : Internet Applications : How to pull data from web page an insert in db
Previous Topic (how to use inet.execute to download a file)Next Topic (How do i determine if the file exist online) New Topic New Poll Post Reply
Surf To:


Not Logged In? Username: Password: Lost your password?
Partners: Download Actual Software | Free Software Download
borderAndreaVB free resources for Visual Basic developersborder

borderAndreaVB Visual Basic and VB.NET source code resources - Copyright © 1999-2007 Andrea Tincaniborder