Cindy's response is excellent and comprehensive. I'd add that using the
FoxPro OLE DB driver would be a better alternative in terms of performance
and features. The only reason I can think of to stick with ODBC is that
*maybe* if the table is shared by an application based upon FoxPro 7.0 or
earlier, there could be some conflict, or locking scheme differences,
between the two runtimes, and I'd want to test for that first. Also if the
Fox ODBC driver is already installed on the target machine and needed by
something else. Otherwise, go with the newer OLE DB driver.
--Bob
"Pranam Ben via .NET 247" <anonymous (AT) dotnet247 (DOT) com> wrote
(Type your message here)
Hi-
I am trying to connect to a FoxPro db. My application is built as a C# user
control in .NET. The DB is a free table directory. I created a DSN
(Microsoft Visual Foxpro Driver type) on the server and linked to the
folder. It created fine. But when I run my code, it gives me a 'file
sample.dbf does not exist'. The file is present under the folder.
I also tried a DSNLess connection. I added a key in the web.config file
ConnStr= "Driver=Microsoft Visual Foxpro
Driver;UID=;PWD=;SourceType=;SourceDB=\\Servername \Data;Exclusive=No
It then gave me an error
An error occurred ERROR [IM006] [Microsoft][ODBC Driver Manager] Driver's
SQLSetConnectAttr failed ERROR [01000] [Microsoft][ODBC Driver Manager] The
driver doesn't support the version of ODBC behavior that the application
requested (see SQLSetEnvAttr). ERROR [01S00] [Microsoft][ODBC Visual FoxPro
Driver]SourceType
I would request an immediate help from any of you guys who have run into
this before. I am running tight deadlines to deliver this application.
Thanks in advance,
Ben
--------------------------------
From: Pranam Ben
-----------------------
Posted by a user from .NET 247 (
http://www.dotnet247.com/)
<Id>FGR/G+eIiEyM3ISE33nSOQ==</Id>