LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Write/Read Database with "Jeffrey"-VIs

Hello,
i want to write/read a sql-database without-the NI-Toolkit.
I found while searching here the Tools from Jeffrey which are available here: http://jeffreytravis.com/lost/index.html
Now i unocked the files and wanted to try t he example "Example - Fetch a Table.vi".
There is also a demo-database included called: "SampleDatabase.mdb"

My current problem is that i dont know what to set to the parameter "connection-string" (somehow the filename, but how?)

Does someone know how to use these files?

Thx for your help


Attached the downloaded zip-file with all the data

0 Kudos
Message 1 of 11
(3,531 Views)
For connections strings you should check out http://www.connectionstrings.com, where you will find connection string for just about anything that you need.


EDIT: In the example provided the connection string assumes you have a DSN created that points to the file. A DSN is a Data Source Name, and in Windows XP you can create one by following the procedure here: HOW TO: Create a System Data Source Name in Windows XP.

Message Edited by smercurio_fc on 09-24-2007 10:49 AM

0 Kudos
Message 2 of 11
(3,505 Views)
Follow-up: If you change the ConnectionString input to something like "Driver={Microsoft Access Driver (*.mdb)};Dbq=C:\Documents and Settings\smercurio\My Documents\LabVIEW forums\LabSQL\Examples\SampleDatabase.mdb;" (making sure the specify the valid path to the database file), then it should work. It works on my system, at least.
0 Kudos
Message 3 of 11
(3,499 Views)
I tried to add a connection string as you described (see trhe attached screenshot, but it generates an error.
What is wrong there? I also tried to write it with:
DNS = thestring
DNS = "thestring"
"thestring"
0 Kudos
Message 4 of 11
(3,495 Views)
It's DSN, not DNS. DNS is a totally different animal.

The DSN provides a means of creating an object that perfoms a connection for you and validates the connection. If you have a DSN you specify the name of the DSN in the connection string, as the shipping example uses. You do not need a DSN if you provide an explicit connection string.

Are you sure the SampleDatabase.mdb file is actually at C:? 'Cause unless you moved it, it's located in the same folder as the example VIs.
Message 5 of 11
(3,485 Views)
First, try to create the connection in the ODBC manager like the readme file says. Once you've done that, enter the name of the connection into the ConnectionString control without the DSN= and ; part. If you look at code for ADO Connection Open, it adds the text DSN= and the ; at the end. Putting this in the example is a mistake. When you use the VIs with your MySQL db, you'll also need to provide the UserID and Password to the ADO Connection Open.
0 Kudos
Message 6 of 11
(3,486 Views)

I tried to do what the readme says, but i think there is a problem with my windows-installation or something is missing.

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"

No problem up to this point, but after i selected the "Microsoft Access Driver" and press "Fertig stellen" the window closes and it look like before, there is nothing like a dialog box (see attached screenshot), so i can´t continue with th points e..g.

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.


Is there a way to re-install this part of windows?

Thanks for your help



0 Kudos
Message 7 of 11
(3,455 Views)
You could go to http://msdn2.microsoft.com/en-us/data/aa937730.aspx and try installing the latest version of MDAC. I did a quick read and I got the impression that some of the Access (jet database) components are not included with the latest versions. You might have to do an install of one of the jet service packs as well.
0 Kudos
Message 8 of 11
(3,432 Views)
I downloaded the MDAC 2.9 and tried to install it but then i got th message:

MDAC 2.8RTM
MDAC 2.8RTM ist mit dieser Version von Windows nicht kompatibel.
Alle Funktionen sind zurzeit Teil von Windows.

*************

Running the component checker 2.0 returns

Following components where matched
MDAC 2.8 SP1 on Windows XP SP2



Message Edited by OnlyOne on 09-25-2007 09:11 AM

0 Kudos
Message 9 of 11
(3,424 Views)
What I understand the message to be is that your version of windows is not compatible. I'll repeat my earlier question. What version of windows are you using?
0 Kudos
Message 10 of 11
(3,416 Views)