Results 1 to 5 of 5

Thread: Open Database from my Visual Basic app

  1. #1

    Thread Starter
    New Member
    Join Date
    Dec 2000
    Posts
    9

    Question

    I want to open a database which is placed on my server in my Visual Basic App. eg http://www.myserver.com/db/database.mdb. It's an Access 2000 database.

  2. #2
    Monday Morning Lunatic parksie's Avatar
    Join Date
    Mar 2000
    Location
    Mashin' on the motorway
    Posts
    8,169
    Is this from an ASP page? If you're using a VB program then you can't access (sorry ) the database remotely like that using Access. The program needs to be on the same machine or over a Microsoft Network (NOT MSN!!).
    If you have an ODBC provider that can provide TCP/IP database connectivity then that should work. Otherwise, a small wrapper program running on the server should let you.
    I refuse to tie my hands behind my back and hear somebody say "Bend Over, Boy, Because You Have It Coming To You".
    -- Linus Torvalds

  3. #3
    Addicted Member
    Join Date
    Jul 2000
    Location
    didn't decide yet
    Posts
    222
    Originally posted by kpn
    I want to open a database which is placed on my server in my Visual Basic App. eg http://www.myserver.com/db/database.mdb. It's an Access 2000 database.
    first you have to add a reference to Microsoft activeX data Objects then use the code:

    Dim dcn As ADODB.Connection

    Set dcn = New ADODB.Connection
    dcn.CursorLocation = adUseClient
    dcn.Open "PROVIDER=Microsoft.Jet.OLEDB.4.0;Data Source=" & App.Path & "\database.mdb"

  4. #4

    Thread Starter
    New Member
    Join Date
    Dec 2000
    Posts
    9
    I wrote:

    dcn.Open "PROVIDER=Microsoft.Jet.OLEDB.4.0;Data Source=" & "http://www.myserver.com/db/db.mdb"

    And got an error saying that it couldn't find the file at c:\... I want to open the database on the server through http.

  5. #5
    Frenzied Member monte96's Avatar
    Join Date
    Sep 2000
    Location
    Somewhere in AZ
    Posts
    1,379
    You can't. Access doesn't support it.
    oOOo--oOOo
    __/\/\onte96
    oOOo--oOOo
    Senior Programmer/Analyst
    MCP
    [email protected]
    [email protected]


    Your results may vary.. some restrictions may apply.. pricing and participation may vary.. not available in all states.. professional driver closed course..quantities limited..

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width