CONNECTING TO ACCESS DB THRU ODBC WITHOUT DSN REMOTLY 
Author Message
 CONNECTING TO ACCESS DB THRU ODBC WITHOUT DSN REMOTLY

I need to connect with ADO to an Access database on a remote server without
setting up a DSN name.

This can be done with SQL Server where the connect string is:

"SERVER=MyServer;UID=;PWD=;DATABASE=myDatabase;DRIVER={SQL SERVER};DSN="

What should it be to do the same to a Access MDB file on the Remote machine?

Hope someone can help.

Gerrit



Mon, 29 Oct 2001 03:00:00 GMT  
 CONNECTING TO ACCESS DB THRU ODBC WITHOUT DSN REMOTLY
The only way I know is to open it directly, but you should have access to
the drive and folder where the database file is.

Dim db as Database
Set db = OpenDataBase("E:\dbname.mdb")

where E is the Drive to acces to the remote machine, I mean the drive that
the remote machine has shared.
But this isn't a remote connection.



Mon, 29 Oct 2001 03:00:00 GMT  
 CONNECTING TO ACCESS DB THRU ODBC WITHOUT DSN REMOTLY
You can use:
cn.open ("FileDSN=" & App.Path & "\my.dsn")

then ship a my.dsn with your app... the *.dsn file is just an INI file which
means you can edit it using GetPrivateProfileString, etc.

I do beleive however, you can specify a varstr as a connection without
having a User/Server DSN or DSN file;  I think its something like
"UID=;PWD=;DATABASE=mydb.mdb;DRIVER={Microsoft Access Driver (*.mdb)};DSN="
but you will have to check.

Steve

Quote:

>I need to connect with ADO to an Access database on a remote server without
>setting up a DSN name.

>This can be done with SQL Server where the connect string is:

>"SERVER=MyServer;UID=;PWD=;DATABASE=myDatabase;DRIVER={SQL SERVER};DSN="

>What should it be to do the same to a Access MDB file on the Remote
machine?

>Hope someone can help.

>Gerrit



Mon, 29 Oct 2001 03:00:00 GMT  
 CONNECTING TO ACCESS DB THRU ODBC WITHOUT DSN REMOTLY
Thanks.


Tue, 30 Oct 2001 03:00:00 GMT  
 
 [ 4 post ] 

 Relevant Pages 

1. Connecting to Paradox db without a DSN

2. Using VB to connect to DB without using ODBC

3. Using VB to connect to DB without using ODBC

4. How do I connect to a DB without using ODBC

5. Using VB to connect to DB without using ODBC

6. Can VBScript under WinScriptHost connect to Access db without Access being installed on the workstation

7. Can you connect to Access thru ODBC?

8. Connecting to Access thru ODBC

9. Cannot connect to an Access DSN using ODBC!

10. Cannot connect to an Access DSN using ODBC

11. Cannot connect to an Access DSN using ODBC!

12. Cannot connect to an Access DSN using ODBC

 

 
Powered by phpBB® Forum Software