# Re: 用data1的connect连接ODBC,太慢.....

Posted by 纪文和 on June 17, 1998 at 10:02:47:

In Reply to: 用data1的connect连接ODBC,太慢..... posted by kkcheung on June 17, 1998 at 06:55:07:

: 请教各位,本人用data1的connect中,写上ODBC;dns=mydata....等
: 当次用上,也要connect一次,可有方法改善?

看不太懂您的意思, 如果您问的是每次 Form_Load 之后, Data1会重新
Connect, 那么您可以设定 Global 的资料库变数ㄚ.

Global db ad Database 'in Module
'ODBC
Set DB = OpenDatabase("", False, False, "ODBC;DSN=XXX;UID=XXX;PWD=XXX")
'ACCESS
Set DB = OpenDatabase("DATABASEPATH")

Follow Ups:

- Re: 用data1的connect连接ODBC,太慢..... kkcheung 10:36:44 6/20/98 (1)
  - Re: 用data1的connect连接ODBC,太慢..... 纪文和 01:09:54 6/25/98 (0)