Home

High Performance VNA Data Management

Free Test Software

Equipment Cart

Free ODBC to LabView Library

Mechanical Analysis

Custom Programming

Forum

Contact

Free LabVIEW SQL/ODBC LLB

sql_LV.llb
sql_LV.llb is a high-performance library for interfacing your LabView application with your ODBC-based database.

NOTE:  Check out the "howto" documentation.

Requirements: LabView (of course, tested with 6.1 +),   OpenG Toolkit (for Variant and Cluster tools, great stuff),  MySQL client (even if you use only ODBC/UnixODBC, though it can be re-compiled)

Download Version 1.08, (latest beta) a million thanks to Christian Bucher at Amadyne for adding DLL-level error checking and typecasts.  I've added a new function, sql_info.vi, and have trussed up the update functions and made the whole thing reentrant (though you better open multiple references/connections).

  • Complete SQL functionality but no SQL programming knowledge required.
  • Connection to most popular databases through ODBC.  Tested with:
  • MySQL
  • Oracle
  • MS Access
  • SQL Server
  • FireBird
  • PostgreSQL
  • MySQL access through direct API
  • High-level, easy-to-use functions for common database operations
  • Direct interaction with local or remote databases
  • All I/O through simple LabView string arrays or...
  • INSERT (REPLACE) and SELECT through clusters with element names as FIELD names with automatic type setting.  Handle:
  • Boolean
  • Int
  • Double
  • String
  • BLOBs
  • Programmer may keep DB connections remained closed until processing data -- DB License issues minimized 
  • Because of slow authentication with MS SQL Server, you may now open a DB as a LV reference and keep the connection open until calling the close VI.  All the VIs are now polymorphic and accept either the original DB cluster or an opened reference.
  • Maintaining an open connection allows the programmer to use "TEMPORARY" TABLEs (good only for the life of a connection) from one SQL query to another.
  • Not multi-threaded, but getting closer with connection and statement handles being allocated to unique memory locations -- contact me (through the VI documentation) if you have a compelling need.



Functions:


  • Open Connection
  • Close Connection
  • DB TABLE lists
  • DB COLUMNS lists.
  • SELECT and SELECT * VI for reading data.
  • UPDATE VI for updating data.
  • INSERT (w/ REPLACE option) VI for writing new data.
  • DELETE VI for record deletion.
  • SQL Commands function (useful for TABLE CREATE statements and the like)
  • Error Function VI. Passes DB engine diagnostics to programmer/user for quick debugging of problems. DB is closed following syntax error (bug fix).
  • Date function
  • sql_info.vi -- relates server/driver information, great for DB checks (along with sql_error) (NEW for 1.07!!)

Databases:


  • MySQL (runs from API or ODBC -- well tested, BLOBs work too)
  • Oracle  (well tested)
  • Firebird  (lightly tested)
  • MS Access  (works well)
  • SQL Server (works well)

Example:


LabView SQL example sql_LV

Linux:


As Microsoft with their Windows OSes draws its last, dying breath (Let's not forget WFWG 3.11), you'll want a cross-platform DB interface for LabView that works well with Linux and into the future.  sql_LV is it -- not only do you save $995 by using sql_LV, think of all the time you'll save re-writing all those VIs when you migrate!
Download the Linux version of sql_LV, it's been tested both with the MySQL API and UnixODBC (connected to a PostgreSQL server).