LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Making labview 2014 and Access 2013 db working correctly

Hi all,


i'm trying to gain access to a database created by Access 2013 from Labview 2014. Since we dont want to buy the NI toolkit i thought to use the old LabSQL library. Has anyone tried to do the same thing or give me some hints about it?

 

 

Actually i have tryed to run the example shipped with LabSQL but i received an error:

 

Exception occured in Microsoft OLE DB Provider for ODBC Drivers: [Microsoft][Driver Manager ODBC] Nome origine dati non trovato e driver predefinito non specificato. in ADO Connection Open.vi->Example - Fetch a Table.vi

 

Reading the README file of the LabSQL i found this:

 

2. As with any database application on Windows, you'll need to create a DSN (Data Source Name) in the ODBC control panel. This DSN is used in your LabVIEW application to connect to the appropriate database. If you want to set up the example database, do the following:
    a.Go to your Windows Control Panels, and open "ODBC Data Sources"
    b.Click on the "System DSN" tab
    c.Click on the "Add..." button.
    d. From the list of drivers, choose "Microsoft Access Driver"
    e.At the dialog box, type in "myDB" for the Data Source Name. Then click on "Select..." button, and find the file "Sample Database.mdb" included with the LabSQL examples. Leave everything else as it is, and hit OK.
    f. Close the ODBC control panel
    g. Test the connection by running one of the examples provided.

 

My problem is that i can't find the driver named "Microsoft Access Driver" so i can't continue through the points of the instructions. I only found "SQL Server" and "SQL Server Native Client 11.0" but if i select one of this the dialog box that appear later is different from the one described in the README instructions...

0 Kudos
Message 1 of 5
(3,338 Views)

You can certainly access the database without the toolkit. There are drivers that I posted on the forum and I have a small complete application on my blog -- you can even download the code from my SVN repository.

 

In terms of you specific problem, you don't need a DSN. What you need is something called a "connection string". Also, don't waste your time with ODBC. The built-in ADO drivers are easier to use. Again, check my posts for details -- I did a 3-part series on database connectivity.

 

Mike...


Certified Professional Instructor
Certified LabVIEW Architect
LabVIEW Champion

"... after all, He's not a tame lion..."

For help with grief and grieving.
0 Kudos
Message 2 of 5
(3,308 Views)

Hi mike, thank you for answering.

My problem is that i cannot find a connection string that giving me no error. I try to use the connection string listed in the site you suggest but sill my problem remain. I have a windows 7 based pc with microsoft access 2013 installed it is possible that i haven't installed some thing. For example i can't find the "Msjet40.dll" on my system32 directory.

0 Kudos
Message 3 of 5
(3,297 Views)
Curious... The thing is, it doesn't matter what you have installed. The functionality you are accessing is a built-in part of Windows. Is the computer you are using yours or does it belong to your company?

What error do you get when you run my code on your computer?

Mike...

Certified Professional Instructor
Certified LabVIEW Architect
LabVIEW Champion

"... after all, He's not a tame lion..."

For help with grief and grieving.
0 Kudos
Message 4 of 5
(3,279 Views)

Mike, thank you for your time. I finally found the problem. It seems there is a bug in Windows 7 64 bit. I had to change the path of the "ODBC Data Sources" from "%windir%\system32\odbcad32.exe" to "C:\Windows\SysWOW64\odbcad32.exe". Opening this second .exe (that i presume is the 64 bit version) allowed me to find the "Microsoft Access Driver" and now all is working fine.

0 Kudos
Message 5 of 5
(3,270 Views)