07-13-2015 08:05 AM
I am trying to connect to an access database (office 365). I downloaded the SQL toolkit (trial version) and would like to connect to a simple database I created on my local C drive. I am having trouble with the connection string. The examples in CVI are very poor and only connect to the sample cvi database. the example that does connect to the microsoft access database crashes. any suggestions?
Solved! Go to Solution.
07-13-2015 09:13 AM
Connecting to a database using the SQL toolkit is easy if you can provide a DSN for it.
Consider that the SQL toolkit is a 32-bit tool: you can only use it while creating 32-bit executable even in 64-bit environment. Nevertheless, in such a case you must create the DSN using the 32-bit version of the ODBC administrator, which you can find in C:\Windows\SysWOW64\odbcad32.exe (note that even the 64-bit program is called odbcad32! )
Once created the appropriate DSN that points to your database (let's call it "MyDSN" for clarity), you should be able to connect to it by using dbH = DBConnect ("DSN=MyDSN");
07-13-2015 09:38 AM
I think a created the dsn correctly. when I try to connect it returns a -10.
07-13-2015 10:15 AM - edited 07-13-2015 10:16 AM
Error -10 is a system error raised from the OS: try calling DBNativeError and see if some error code is returned.
07-13-2015 12:38 PM
error code 0x800004005 when I try to connect to my db
error code 0x80040E4E when trying to connect to the default microsoft database in CVI sql example browser2
07-14-2015 02:45 AM
Have you read this document?
07-14-2015 05:51 AM
I read the document. I tried adding a new connection. it shows up in the browser2 window. when I select it it still gives me the -10 error message. Is there a different way to make a connection to a database? I have a simple table with 5 entries I would like to use to store and retrieve data from multiple pc's.
07-14-2015 06:23 AM
I have no problems in connecting to a MS Access database provided that:
Is your file on the local machine or on a network shared resource?
07-14-2015 07:57 AM
I found an issue with my a corrupted driver in my administrator tools. I deleted it and recreated it. Still no luck. My databse is on my local machine. I am using windows 7 and configured for 32 bit ODBC.
07-14-2015 11:39 AM
I deleted everything and restarted my pc. I followed the procedures again and it is now working. Thanks for you help! Kudos!!!!