once more about *.dbf files

  • Thread starter Thread starter Oleg Yevsyukov
  • Start date Start date
O

Oleg Yevsyukov

I want to use the next code:

string connString = "Provider=MSDASQL.1;" +
"Persist Security Info=False;" +
"Extended Properties=\"DSN=Файлы dBASE;" +
"DBQ=D:\\C#\\I762_DBF\\DBF;" +
"DefaultDir=D:\\C#\\I762_DBF\\DBF;" +
"DriverId=533;" +
"MaxBufferSize=2048;" +
"PageTimeout=5;\";" +
"Initial Catalog=D:\\C#\\I762_DBF\\DBF";
//
OleDbConnection dbfConn = new OleDbConnection(
connString );

And I have an unhandled exception of
type 'System.ArgumentException' occurred in
system.data.dll

Additional information: The .Net Data OLE DB Provider
(System.Data.OleDb) does not support the MSDASQL
Provider, Microsoft OLE DB Provider for ODBC Drivers.

What is wrong in my code????

Thanks to all who have read this, but specially thanks to
whom can help me ;-)
 
Oleg,

You can not use ODBC connections in an OleDbConnection. You will want
to use the classes in the System.Data.Odbc namespace to access your data.

Hope this helps.
 
Back
Top