LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Simple database question

I have an .mdb file that I would like to "open" using LV.  I've installed Database Connectivity Toolkit.  But I still can't seem to open the file.

Does Access have to be installed to view the data in this file?  



Thanks
---------------------
Patrick Allen: FunctionalityUnlimited.ca
0 Kudos
Message 1 of 10
(3,901 Views)
You should be able to open it if you have only MDAC installed. Free download at Microsoft website.
0 Kudos
Message 2 of 10
(3,890 Views)
I was pretty sure MDAC installed with the toolkit.  But just to be sure I went and downloaded the newest version from MS.

I'm still unable to open the .mbd file though.  So I must be doing something wrong. 

I've been looking at the examples, trying to use the Read All Data.vi.  But so far no luck, and I cannot seem to find the info I need included with the toolkit. 
---------------------
Patrick Allen: FunctionalityUnlimited.ca
0 Kudos
Message 3 of 10
(3,884 Views)

When I run that VI is asks to setup the data link properties.

Select ODBC in the Provider tab as shown. Then goto the Connection tab and select Labview then test your connection. Click on OK when happy. The vi should work.

Are you doing that?

David

Message Edited by David Crawford on 04-20-2006 04:32 PM

0 Kudos
Message 4 of 10
(3,876 Views)
This does appear to work.  But only when connecting with the sample database included with the toolkit.  When I try to point my .mdb file,  it fails with this error:

Error -2147467259 occurred at DB Tools Open Connec (String).vi->DB Tools Open Connec (Path).vi->Read All Data.vi

Possible reason(s):
Exception occured in Microsoft OLE DB Provider for ODBC Drivers, [Microsoft][ODBC Microsoft Access Driver] Not a valid password..  in DB Tools Open Connec (String).vi->DB Tools Open Connec (Path).vi->Read All Data.vi

I am using the correct admin password for the database.  So I'm not really sure where I'm going wrong.

Do I have to somehow "register" my .mbd file with another application?  
---------------------
Patrick Allen: FunctionalityUnlimited.ca
0 Kudos
Message 5 of 10
(3,862 Views)

Hi Pallen

Try creating a .udl file that points to your .mdb. It tells you how to do that in the manual. There is an example .udl shipped with the DCT and can be found under examples\database in your labview installation.

Hope this helps

David

0 Kudos
Message 6 of 10
(3,856 Views)

Oh just thought of something. If you are doing this with one of your own mdb it might be better to select the Microsoft Jet 4.0 option on the Provider tab. The Connection tab will then allow you to browse to the mdb that you want to try.

I am doing this from memory and I don't have labview at home so I apologise if I don't have all my facts straight as I can't try it out.

David

0 Kudos
Message 7 of 10
(3,852 Views)
Thanks for all the information. 

Unfortunately all I keep getting are what appears to be password errors.  As far as I know, I do have the correct admin password.  But perhaps the person that developed the application did not give us the "real" admin password. 

Looks like this is going to be a lot more difficult than I expected.
---------------------
Patrick Allen: FunctionalityUnlimited.ca
0 Kudos
Message 8 of 10
(3,846 Views)
It turns out we were given the wrong password.  I was able to recover the correct password using a utility I found online. 

I'm still having problems though.  The only way I was able to get connected was to build a connection string.  Unfortunately this only worked one time.  Now the same method will no longer work. 


---------------------
Patrick Allen: FunctionalityUnlimited.ca
0 Kudos
Message 9 of 10
(3,839 Views)
Ok.  It only took most of the afternoon.  But it looks like I've been able to take my first step.  

Not having the correct password gave me problems right from the start.  I was able to retrieve the correct password using a utility I downloaded from this page:

http://www.everythingaccess.com/

I still wasn't correctly creating my OBDC source.  But I wanted to be sure that the .mdb file I was using wasn't somehow corrupted or broken.  Without Access, I found I was able to open the database with a tool I found here:

http://www.alexnolan.net/software/mdb_viewer_plus.htm

This confirmed for me that I did have the correct password and that the file was ok.  I then went to Windows Control Panel and found the OBDC Data Source Administrator and created a new Data Source.  I was able to point to my .mdb file as the Database and enter the password.  The next time I ran the Read All Data.vi I was able to select my new Data Source and the connection worked this time.  

This is my first experience with manipulating .mdb files using LabView, and it was a little more difficult than I expected.  For awhile I was unsure if the DTK was actually able to open .mdb files, or if I had made an incorrect assumption of it's abilities.

Thanks to those who responded to my queries and pointed me in the right direction.


---------------------
Patrick Allen: FunctionalityUnlimited.ca
0 Kudos
Message 10 of 10
(3,833 Views)