From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Accessing FileMaker Pro DBs with LabVIEW ODBC

I've seen numerous references but I'm unclear on how to access databases using ODBC through LabVIEW. I'm specifically interested in accessing FileMaker Pro databases on a Mac (LabVIEW is also on a Mac).

If anyone has any insight, I would greatly appreciate it.

Thanks
0 Kudos
Message 1 of 10
(5,744 Views)
To access databases in LabVIEW, you can create a DSN for the ODBC driver. To do this, use OpenLink or Apple's ODBC Administrator. You can create either User or System DSNs and point them to the database you want to access. Then, in LabVIEW, when you're using the Database Connectivity Toolset, you can put down a string constant with the DSN name and wire that to the Open DB Connection.vi, which should then connect to the database. Hope this helps!
Jeremy L.
National Instruments
0 Kudos
Message 2 of 10
(5,732 Views)
hi there

under windows you can also use the microsoft ADO ActiveX control for accesing ODBC datasources. search the web for "LabSQL", its a free llb.

best regards
chris
Best regards
chris

CL(A)Dly bending G-Force with LabVIEW

famous last words: "oh my god, it is full of stars!"
0 Kudos
Message 3 of 10
(5,726 Views)
How about using the CD Connectivity Toolset tools/VIs?  I have a current app that uses those tools to access and MDB file.  I'm trying to work out how to do the same for FP8 files.  I give a Connection String to the Open Connection.VI -- what would the Connection String be for an FP8 file?
0 Kudos
Message 4 of 10
(5,640 Views)
Yet again a "sip of the flingers" -- I meant the DB Connectivity Toolset...
0 Kudos
Message 5 of 10
(5,637 Views)

Instead of building a connection string, you can create a DSN file as described earlier in the thread. This has some advantage because the connection information is stored in the file and you can easily change the file if you change the DB driver. You can do this in windows by going to the control panel>>Administrative Tools>>ODBC data sources and going to the File DSN tab. Once you save the file, you can wire the path of the file into the Open Connection VI. If you must build the connection string for your specific DB, you might want to search google for how to do this.

Also, don't post the same question to multiple threads. It will only make people waste their time and not want to help you the next time you ask.


___________________
Try to take over the world!
0 Kudos
Message 6 of 10
(5,623 Views)

Sorry about the double posting.  I added a reply onto this current thread AFTER having started the other thread.  I'm having trouble navigating this new setup for the forums and frequenlty can't find information -- let alone find it easily.  I think I need to reset some of my access settings here as well.

It seems to me that whether I use the DSN file or Connection String approach that the real problem is actually setting the Connection string -- that's what's stored in the DSN file is it not?  And it seems like it's actually doing the correct Connection that is the problem.  If tried a number of things but just can't see to get it to work.

THe VI is the Connect_to_Database_by_name example, modified to use the new Connection String.

 

The information that I use for the Connection String is:

Provider=DataDirect 32-Bit SequeLink 5.4;
Data Source=C:\Program Files\Neurofeed\NeuroCarePro\Common Files\Users.FP8;
Persist Security Info=False

The error I get is:

Error -2146824582 occurred at DB Tools Open Connec (String).vi->Connect_to_DataBase_by_name Mine.vi

With the possible reason being:

Exception occured in ADODB.Connection, Provider cannot be found. It may not be properly installed.. Help Path is C:\WINDOWS\HELP\ADO270.CHM and context 1240655 in DB Tools Open Connec (String).vi->Connect_to_DataBase_by_name Mine.vi

 

But I believe that the correct ODBC driver is installed -- per FileMaker directions -- and is available via the System Administrator applet.

 

 

 

0 Kudos
Message 7 of 10
(5,620 Views)

A DSN file is an ASCII configuration file (you can open it with notepad) and it holds a bit more data than the connection string. The big advantage about using it is that windows builds it for you using a wizard, and often allows you to test the connection. If you managed to properly create a DSN file which works, then you will know that the problem is with your config file. If you haven't, then you probably have a problem with your driver.

As for the forum, for some inexplicable reason, the search defaults to the last 90 days. To search more, you actually need to go into the advanced search page.


___________________
Try to take over the world!
0 Kudos
Message 8 of 10
(5,618 Views)
OK, thanks.  The wizard that you're describing is a Windows service -- not LV supplied?  Do I invoke that through the Administrative Services applet of Control Panels or, in some other way?
0 Kudos
Message 9 of 10
(5,612 Views)
Yes, it has nothing to do with LV and you start it by creating a new DSN file in the ODBC applet. The configuration screen vary depending on which driver you choose, so you might not have too many options with your own driver, but in any case, it should create a DSN file which you can use.

___________________
Try to take over the world!
0 Kudos
Message 10 of 10
(5,609 Views)