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.
Printable View
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.
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.
first you have to add a reference to Microsoft activeX data Objects then use the code:Quote:
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.
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"
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.
You can't. Access doesn't support it.