# Re: I know can use RDO access remote database,but,I ask for you that how to use DAO ways access remote database

Posted by AadyLin on September 14, 1998 at 17:10:13:

In Reply to: I know can use RDO access remote database,but,I ask for you that how to use DAO ways access remote database posted by wen on September 14, 1998 at 16:27:23:

: hi,
: how are you,I wish who can tell me?
: USe dao access remote database
: I must set what to do?
: In windows NT server4.0 open ODBC
: system dsn:yuan
: server database:e:\db1.mdb
: on local machine win95 system
: program code what to write?

you can use following:

Set DBWrk = CreateWorkspace("", "admin", "", dbUseJet)
Set DBase = DBWrk.OpenDatabase("", dbDriverNoPrompt, True, "odbc;dsn=yuan;uid=sa;pwd=;database=your database name;")
Set LocalDbase = DBWrk.OpenDatabase(DbPath)

you can study the online book

Follow Ups:

- there is errors:run-time error "3151",odbc-connection to 'yuan' failed wen 16:02:33 9/15/98 (0)