10-18-2016 05:03 AM
Hi all
I am using CVI 2013 SP2 and SQL toolkit 2.3 on win7 64bit machine
In order to connect to *.mdb file i use the following statement
hdbc = DBConnect("DRIVER=Microsoft Access Driver (*.mdb);DBQ=c:\\Temp\\Sampl.mdb") ;
When ia compile & run as 32bit exe it works
When ia compile & run as 64bit exe i get the following:
0x00000FEC: Function DBConnect: (return value == -10 [0xfffffffffffffff6]). Native error code -2147467259 0x80004005 Microsoft OLE DB Provider for ODBC Drivers: [Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified
Any help will be appreciated
Thanks for advance
Gabel Daniel
10-19-2016 01:18 PM
Hi Gabel,
Are you using the 32bit version of odbcad32.exe or 64bit? This might be because you did not install the 64 bit ODBC driver.
This might be a helpful link: http://digital.ni.com/public.nsf/allkb/E7984C0DA0F0E65086257694005B4CB7?OpenDocument
I hope this helps!
10-20-2016 12:02 AM
Hi T. Le
Thanks for the reply
I have already checked the link you suggested with no luck
you can try the sample that come with the sql toolkit "connect".compile it as 64 bit exe & run it
it will no work.Further more you can not set DSN for *.mdb in the odbc32.exe (the 64bit version).
I resolved my immediate problem by writing all my sql staff in separate 32bit exe. That app communicate with my main 64bit app via shared memory.
thanks
Gabel Daniel
10-20-2016 03:08 AM - edited 10-20-2016 03:09 AM
I can read in the readme file for SQL Toolkit 2.3 (which appears to be not available on NI site but should be installed on your machine):
Note To run example programs in 64-bit mode, you must use a 64-bit Microsoft Access driver, which is not included with the LabWindows/CVI SQL Toolkit. You can download the Microsoft Access Database Engine Redistributable, which includes drivers you need to run in 64-bit mode, from the Microsoft website. Note that the 64-bit driver cannot be installed concurrently with 32-bit versions of Microsoft Office.
As I can understand, you don't have a 64-bit driver installed and that's why you cannot run 64-bit examples. the link given above points you to Microsoft site where to download the appropriate driver.
10-20-2016 03:38 AM
Hi Roberto
Thanks for the help
It was very helpful
Gabel Daniel