2012-09-13 188 views
1

我想让这3个很好地工作。如果我用这个连接字符串德尔福+ ADO + dBase

Driver={Microsoft dBASE Driver (*.dbf)};DriverID=277;OLE DB Services = -1;Extended Properties=dBase IV;Dbq=c:\mypath 

ADOTable1.Open做的操作是非常快的(好),但GetIndexNames回报什么(不好)。

如果我改用此连接字符串

Provider=Microsoft.Jet.OLEDB.4.0;Extended Properties=dBASE IV;OLE DB Services=-1;Data Source=c:\mypath 

ADOTable1.Open做的操作是非常缓慢的(坏的),而GetIndexNames不会返回索引名称它应该(好)的方式。

如何通过ADO为dBase表获得速度和索引信息?

回答

2

我们使用以下连接字符串,它工作得很好。

Provider=MSDASQL.1;Persist Security Info=False;Extended Properties="Driver={Microsoft Visual FoxPro Driver};UID=;SourceDB=c:\mypath;SourceType=DBF;Exclusive=No;BackgroundFetch=Yes;Collate=Machine;Null=Yes;Deleted=Yes;" 
+0

我打算给一个镜头并报告回来。谢谢! – Cromulent

+0

当我在TADOConnection.ConnectionString属性编辑器中放入此字符串并尝试将Connected属性翻转为True时,IDE内部出现错误 - >“[Microsoft] [ODBC Driver Manager] Driver does not support this function”。我很确定我有其他属性的默认值。模式是cmUnknown。 CursorLocation是clUseClient。 IsolationLevel是ilCursorStability。 ConnectOptions是coConnectUnspecified。我记得要为我自己的SourceDB路径。我可能会缺少什么? – Cromulent

+0

您是否检查过Provider属性设置为“MSDASQL.1”?你可以尝试删除一些选项? –