# Re: 要如何用VB6开dbf的档案??(no)

Posted by test on October 22, 1999 at 12:34:21:

In Reply to: Re: 要如何用VB6开dbf的档案?? posted by 梁 檩 on October 19, 1999 at 17:59:19:

: : 我有一个附档名为dbf的档案,请问我要如何开启
: : 我用VB6 SP3 + ADO
: : 我设ODBC(Microsoft dBase Driver)与ADODC Connect 却出现
: : [Microsoft][ODBC dBase 驱动程式]从外部资料库驱动程式产生的非预期的错误
: : 的错误讯息,请问是我哪里设错了吗,那要如何设定??
: : 请大家帮忙,感激不尽!!

: 既然已设odbc, 不如用rdo,效果不错!
: Dim Env As rdoEnvironment
: Dim Db As rdoConnection
: Dim Rs As rdoResultset

: Set Env = rdoEnvironments(0)
: Set Db = Env.OpenConnection("KTDBF1", rdDriverCompleteRequired, True, "")
: SQLDBF = "SELECT * FROM Matme ORDER BY Mat_cm"
: Set Rs = Db.OpenResultset(SQLDBF, rdOpenKeyset)
: 如有一栏位为mat_cm
: 可用 rs("mat_cm") 读取
: ...

Follow Ups: