# Re: 怎样动态设定DataEnvironment 的DataSource?

Posted by 小琳 on August 10, 1999 at 20:31:50:

In Reply to: 怎样动态设定DataEnvironment 的DataSource? posted by Fai on August 10, 1999 at 16:52:20:

: 本人有一个DataEnvironment,DataSource="D:\ESU\ESU.mdb",DataEnvironment 裹面有几个Command
: 由于这程式会设在不同的电脑上,因此需要改变不同的Path
: 所以要动态设定DataEnvironment 的DataSource

: 我首先将DataEnvironment的ConnectionString删除,
: 捻后我在form中,写了此行
: ConnStr = "Provider=Microsoft.Jet.OLEDB.3.51;" & "Data Source=" & DbDir & "ESU.mdb"
: DataEnvironment1.Connection1.ConnectionString = ConnStr
: 想动态改变Directory Path 的位置,当一用到Command 的时候
: Error Message is displayed as "[Microsoft][ODBC Driver Manager] Data Source name not found and no default driver specified"
: 请问应怎么办?
: 感激不尽力!!!

:::小女子想知道您的DbDir变数内容是什么???

Follow Ups:

- Re: 怎样动态设定DataEnvironment 的DataSource? Fai 10:43:28 8/11/99 (0)
- Re: 怎样动态设定DataEnvironment 的DataSource? Fai 10:10:42 8/11/99 (0)