General information
Category:
Databases,Tables, Views, Indexing and SQL syntax
Title:
Failure to connect to VFP DBC DSN via ODBC
I have a VFP database that I wish to access via ODBC from a program that I have written in C++. The database is located on a Win NT server in my network.
I have 3 other computers in the network that I believe are similarly configured. All are running Windows XP. On each of these machines I have used the ODBC Administrator to configure a system DSN to link to the VFP database using the Microsoft FoxPro Visual FoxPro driver. One of these 3 computers is my development system.
I have written a program using MS VC++ and MFC database classes to access this database. The program works correctly on my development system, but fails on the other 2 computers. During the attempt to connect to the database, I get the following error message:
[Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified
On each of the machines, I turned the ODBC trace function on, and have been comparing the SQL.LOG file to see if I can determine what is failing.
On each machine, I can see a sequence of SQL function calls as follows:
SQLAllocEnv
SQLAllocConnect
SQLGetInfoW with SQL_ODBC_VER
SQLSetConnectAttrW with SQL_ATTR_LOGIN_TIMEOUT
SQLDriverConnectW
The last function succeeds on my developement system, but fails on the other two systems.
When I examine the trace file closely, I note that the connection string argument in all three cases is "******\ 0", with a length of -3 (I think that means that the connection string is null terminated.) I can find nothing in the documentation about such a connection string.
I would appreciate any input as to what is going on here.
Thanks for your help.
Jim
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only