As of LabWindows/CVI 2013 SP2, the SQL Control Toolkit is now included with LabWindows/CVI Full and is fully licensed with the same serial number used to activate LabWindows/CVI development environement.
The LabWindows/CVI SQL Toolkit is an add-on package for accessing databases. The toolkit contains a set of high-level functions for performing the most common database tasks and advanced functions for customized tasks.
A database consists of an organized collection of data. While the underlying details can vary, most modern Database Management Systems (DBMS) store data in tables. The tables are organized into records, also called rows, and fields, also called columns. Every table in a database must have a unique name. Similarly, every field within a table must have a unique name.
Database interactions occur within a database session. A simple session consists of the following steps:
To use a SELECT statement, you must bind the selected columns to variables in your program. You then can use the fetch functions to retrieve the selected rows. Each time you call a fetch function, the LabWindows/CVI SQL Toolkit copies the column values into the bound variables. You also use the bound variables when updating a row or creating a new row. That is, when updating or creating a row, you copy the new values into bound variables and then call the appropriate function. For more details on variable binding, refer to Using the SQL Toolkit Library in the LabWindows/CVI SQL Toolkit Help.
You also can get information about an active SELECT statement, such as the number of columns selected, the name and data type of a given column, and the number of rows selected. This information is useful when selecting all columns (SELECT * ...) in an unfamiliar table or when creating a program, such as a database browser, that must access a variety of tables.
4. Step 4. Deactivating SQL Statements
After you finish using a statement, deactivate the statement to free system resources. Deactivation is especially important when fetching in any direction; the LabWindows/CVI SQL Toolkit properly closes and deletes temporary log files.
5. Step 5. Disconnecting from the Database
At the end of a database session, disconnect from the database to free system resources.
Structured Query Language (SQL) consists of a widely supported standard for database access. You can use SQL commands to manipulate the rows and columns in database tables. The following list describes some of the most useful SQL commands.
The following figure shows how the major SQL Library functions relate to each other. Funciton references can be found in the LabWindows/CVI SQL Toolkit Help.
The LabWindows/CVI SQL Toolkit supplies a few ODBC database drivers. Database system vendors and third-party developers offer more powerful versions of these drivers. They also offer drivers for other database systems. The LabWindows/CVI SQL Toolkit complies with the ODBC standard, so you can use it with any ODBC-compliant database drivers. Refer to your vendor documentation for information about registering your specific database drivers with the ODBC Data Source Administrator.
>> Download and evaluate the LabWindows/CVI SQL Toolkit for free
>> Purchase the LabWindows/CVI SQL Toolkit as part of LabWindows/CVI Professional
Did you find this tip useful? Rate this document or add a comment below.
If you give this a try, share your experience! Add a comment below.