以前通过ado访问底版本的dbf数据库用的是:
Provider=MSDASQL.1;Persist Security Info=False;Mode=ReadWrite;Extended Properties="CollatingSequence=ASCII;DBQ=E:\;Deleted=1;Driver={Driver do Microsoft dBase (*.dbf)};FIL=dBase 5.0;MaxBufferSize=2048;MaxScanRows=8;PageTimeout=600;SafeTransactions=0;Statistics=0;Threads=3;;UserCommitSync=Yes;"
现在不能用了。
查了很多资料,不得要领,请高手指教。

解决方案 »

  1.   

    conConnection.Open "Provider=MSDASQL.1;DRIVER=Microsoft Visual FoxPro Driver;UID=;Deleted=yes;Null=no;Collate=Machine;BackgroundFetch=no;Exclusive=No;SourceType=DBF;SourceDB=" & App.Path & ";"
      

  2.   

    如果不清楚连接字符,查看这个网站:http://www.connectionstrings.com/
    Visual FoxPro 
     OLE DB, OleDbConnection (.NET) 
     Database container (.DBC):"Provider=vfpoledb.1;Data Source=C:\MyDbFolder\MyDbContainer.dbc;Collating Sequence=machine"  Free table directory:"Provider=vfpoledb.1;Data Source=C:\MyDataDirectory\;Collating Sequence=general"  Force the provider to use an ODBC DSN:""Provider=vfpoledb.1;DSN=MyDSN"" 
    Read more (Microsoft msdn) >>
     ODBC 
     Database container (.DBC):"Driver={Microsoft Visual FoxPro Driver};SourceType=DBC;SourceDB=c:\myvfpdb.dbc;Exclusive=No;NULL=NO;Collate=Machine;BACKGROUNDFETCH=NO;DELETED=NO"  Free Table directory:"Driver={Microsoft Visual FoxPro Driver};SourceType=DBF;SourceDB=c:\myvfpdbfolder;Exclusive=No;Collate=Machine;NULL=NO;DELETED=NO;BACKGROUNDFETCH=NO" 
    "Collate=Machine" is the default setting, for other settings check the list of supported collating sequences >>
    另外友情提醒:这是VB论坛不是属于vfp:)