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: 

Is it possible to read .db files without database toolkit?

I have some coordination-data saved in a SQL file (*.db) by another program. The only thing I want to do is to read some values from these files without purchasing the complete database-toolkit. Is there a possibility in LabVIEW?

0 Kudos
Message 1 of 21
(5,946 Views)
There are free toolkits such as LabSQL. A search will return other options.
0 Kudos
Message 2 of 21
(5,934 Views)
How much of that is unique to the SQLite database?
0 Kudos
Message 4 of 21
(5,903 Views)

 

 

The Database Connectivity Toolset makes it easy to access a database by executing many of the SQL commands for you without requiring you to know SQL.

 

Maybe this helps

How to connect to MySql Database without using Database Connectivity Toolkit LV 2009

 

The Database Connectivity Toolset is the preferred method of database communication with LabVIEW.

 

As several of you are aware,  the Database Connectivity Toolset comes with LabVIEW Developer Suite (list of included software can be found below) , with this package the toolkit must not be purchased separately.

 

  • All the functionality of the Professional Development System
  • LabWindows/CVI Full Development System
  • Measurement Studio Enterprise Edition
  • VI Analyzer Toolkit
  • PID Toolkit
  • Report Generation Toolkit for Microsoft Word and Excel
  • Database Connectivity Toolkit
  • Internet Toolkit
  • Advanced Signal Processing Toolkit
0 Kudos
Message 5 of 21
(5,847 Views)

Well, I have the Database Connectivity Toolkit, and while I can read *.accdb and *.mdb files just fine, I am not able to read *.db files.  The *.db files were created by another (non-LabVIEW) program running SQLite.

 

When I run the "Read DataBase Structure and Data.vi" in the LabVIEW examples I get this error:

 

NI_Database_API.lvlib: DB Tools Open Connec (Path).vi->Read DataBase Structure and Data.vi<ERR>ADO Error: 0x00000001
The file provided is not a data link (UDL) or a file DSN.

 

I am entering the file name as "connection information"; is this correct?

 

I am also in the process of trying this open source toolset:

 

https://lavag.org/topic/15613-sqlite-for-openg

 

... which makes it seem that the LabVIEW Database Connectivity Toolkit cannot be used to read a .db SQLite file ... or can it?  The manual (http://www.ni.com/pdf/manuals/371525a.pdf) seems to be MS-Access-centric, with no mention of SQLite.

 

Thanks,

john

0 Kudos
Message 6 of 21
(5,466 Views)

Is it possible to post your VI?

0 Kudos
Message 7 of 21
(5,460 Views)
It is not correct to just specify a file path. For the NI toolkit, you use an ole or odbc driver and create a connection with that. The manual seems pretty clear on that.
0 Kudos
Message 8 of 21
(5,453 Views)

@JBoydFL wrote:

... which makes it seem that the LabVIEW Database Connectivity Toolkit cannot be used to read a .db SQLite file ... or can it?


The DB toolkit can't read ANY file. It uses ADO or ODBC, which are components in Windows which are specifically designed so that your code doesn't need to know how to access the actual files, but will use a standard interface for accessing databases.

 

In the case of SQLite, you need to find and install a small free driver which provide ODBC support, which then allows you to access it through ODBC.

 

The toolkit linked to on LAVA (as well as the LVS one, I think) make direct call into the SQLite DLL, which does manipulate the file directly, so they don't need the ODBC driver. Of course, that also means that they can't be used to work with other DBs (unless code is added to support performing the same operations through ADO).


___________________
Try to take over the world!
0 Kudos
Message 9 of 21
(5,430 Views)

Yes, but I'm looking for more specific info, namely help on a connection string, especially "Provider=...???..." (if needed).  Obviously the string I have in the attached vi is wrong (for *.db files, though it works for my *.mdb and *.accdb files).  I also attach a sample database from a SQLite demo and an image of what it looks like in "SQLite browser".  Thanks !

0 Kudos
Message 10 of 21
(5,421 Views)