# Re: 请问如何读取 mdb资料库(Table不是汇入而是由外部连结至mdb,Use VB6 code)??

Posted by 大汉堡 on June 09, 1999 at 19:56:41:

In Reply to: 请问如何读取 mdb资料库(Table不是汇入而是由外部连结至mdb,Use VB6 code)?? posted by 嫣红 on June 09, 1999 at 17:09:31:

: 请问如何读取 mdb资料库(Table,不是汇入而是而是由外部连结至mdb,Use VB6 code)??

: 谢谢大家帮忙

dim con_mdb as adodb.connection
dim res_mdb as adodb.recordset
dim sql_str as string
dim con_str as string
set con_mdb = new adodb.connection
set res_mdb = new adodb.recordset
con_str = "provider=microsoft.jet.oledb.3.51;"& _
"data source = /../??.mdb"
sql_str = "select * from mdb_table"
con_mdb.open con_str
set res_mdb = con_mdb.execute(sql_str)
这样res_mdb就变成可用的Recordset....

Follow Ups:

- 请问为何出现' 找不到可安装的ISAM '??? 嫣红 09:53:05 6/10/99 (0)
- 请问为何出现' 找不到可安装的ISAM '??? 嫣红 09:51:59 6/10/99 (0)