connect to a website database from vb application!!

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • ghasemabedi
    New Member
    • Nov 2007
    • 2

    #1

    connect to a website database from vb application!!

    hi everybody.
    from a [vb6 or vb.net] application i need to connect to a database thet located
    in a website!!
    now how i connect!
    can somebody show me a sample code for it?
  • Dököll
    Recognized Expert Top Contributor
    • Nov 2006
    • 2379

    #2
    Originally posted by ghasemabedi
    hi everybody.
    from a [vb6 or vb.net] application i need to connect to a database thet located
    in a website!!
    now how i connect!
    can somebody show me a sample code for it?
    Greetings and salutations, ghasemabedi!

    I can start you off connecting to the site, you 'll need to do some leg work to fit your purpose:

    [CODE=VB]

    Private Sub LoadMyWebDataba se_Click()
    Dim LoadingIE As Object
    Dim LoadingItem As Object
    Dim LoadingMain As Object

    'Making it happen here, building IE session.
    Set LoadingIE = CreateObject("i nternetexplorer .application")

    'Loading URL of your database.
    LoadingIE.Navig ate ("www.YourDatab ase.com")

    'Here's a chance to wait for YourDatabase to load.
    Do While (LoadingIE.Read yState <> 4)
    Loop

    'Here's a chance to manage the main item.
    Set LoadingItem = LoadingIE.Docum ent

    'Here's a chance to manage the main object.
    Set LoadingMain = LoadingItem.Bod y

    'You can remove this to load site straight away...
    If (MsgBox("Would you like to load YourDatabase on the web?", _
    vbQuestion + vbYesNo, "Loading YourDatabase!") = vbYes) Then

    'Loading your wonderful database
    LoadingIE.Theat erMode = True
    LoadingIE.Theat erMode = False
    Else


    'Close your database and call it a day...
    LoadingIE.quit

    End If

    End Sub

    [/CODE]

    that oughta do it;-)

    Please stay tuned for added support, if needed.

    Good luck and welcome!

    Dököll
    Last edited by Dököll; Nov 29 '07, 02:34 AM. Reason: CODE tags

    Comment

    Working...