# Re: 请问如何以ODBCDirect型式的DAO workspace及database物件, 开启一个mdb资料库?

Posted by chjichin on January 05, 1999 at 09:38:28:

In Reply to: 请问如何以ODBCDirect型式的DAO workspace及database物件, 开启一个mdb资料库? posted by JD on January 03, 1999 at 14:48:44:

: 如subject,
: 试了好几种参数(OpenDatabase)都不对, 请问该如何下参数(OpenDatabase)呢?

Set wks = DBEngine.CreateWorkspace("toodbc", "sa", "", dbUseODBC)
Set db = wks.OpenDatabase("newdevice1", dbDriverComplete, False,"odbc;database=newdatabase;")
Set rs = db.OpenRecordset("基本资料", dbOpenDynaset, 0, dbPessimistic)

请参考,谢谢!

Follow Ups: