once more about *.dbf files

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 ;-)
 
N

Nicholas Paldino [.NET/C# MVP]

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top