我觉得直接调用WinApi函数SQLConfigDataSource更好!
配置DBF数据源如下:
L_Str_Attributes := 'DSN=Mydbf'+Chr(0)+'SourceDB=d:\data'
+Chr(0)+'SourceType=DBF'+Chr(0);
L_Str_Driver := L_Str_Driver;
If Not SqlConfigDataSource(0,1,PChar(L_Str_Driver),PChar(L_Str_Attributes)) then
ShowMessage.MessageBox('ODBC配置错误!')
我觉得直接调用WinApi函数SQLConfigDataSource更好!
配置DBF数据源如下:
L_Str_Attributes := 'DSN=Mydbf'+Chr(0)+'SourceDB=d:\data'
+Chr(0)+'SourceType=DBF'+Chr(0);
If Not SqlConfigDataSource(0,1,PChar(L_Str_Driver),PChar(L_Str_Attributes)) then
ShowMessage.MessageBox('ODBC配置错误!')