With the LabWindows/CVI SQL Toolkit, you can communicate with more than 30 different database formats directly from LabWindows/CVI. Many LabWindows/CVI users developing automated test systems are using the SQL Toolkit to store their results in a database for post processing and further analysis.
Click on the arrow button to continue.
!
BEGIN_TEXT
!
Database Communication
0
0
0
0
255
255
255
255
0
0
0
0
0
0
255
255
255
0
5
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
8
8
~~
~~
-1
0
0
0
0
3
3
-1
3
0
0
DBASE.AVI
0
1
4935
3630
5685
2190
0
0
0
0
BEGIN_TEXT
This example program illustrates common database operations from LabWindows/CVI. With the SQL Toolkit, you can store data to a database, fetch data from a database, and perform SQL queries to search through your data. This example uses simulated weather data for one year.
Click on the arrow button to continue.
!
BEGIN_TEXT
!
Database Communication
0
0
0
0
255
255
255
255
0
0
0
0
0
0
255
255
255
0
5
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
8
8
~~
~~
-1
0
0
0
0
3
3
-1
3
0
0
DBASE.AVI
0
2
1920
2685
3900
1425
0
0
0
0
BEGIN_TEXT
Click on the Generate Data button to build a database of simulated weather data.
!
BEGIN_TEXT
!
Database Communication
0
0
0
0
255
255
255
255
0
0
0
0
0
0
255
255
255
0
5
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
8
8
~~
~~
0
0
0
0
0
3
3
0
3
0
-1
DBASE.AVI
0
4
5100
3180
6180
2025
0
0
0
0
BEGIN_TEXT
You can see the type of data generated on this screen. The program generates random data for temperature, sunshine, precipitation, and wind speed for each day over the period of one year. These statistics are stored in a database as they are generated.
Click on the Return button to continue.
!
BEGIN_TEXT
!
Database Communication
0
0
0
0
255
255
255
255
0
0
0
0
0
0
255
255
255
0
5
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
8
8
~~
~~
0
0
0
0
0
3
3
0
3
0
-1
DBASE.AVI
0
6
3105
2415
3225
1470
0
0
0
0
BEGIN_TEXT
Click on the Graphical Analysis of Data button to continue.
!
BEGIN_TEXT
!
Database Communication
0
0
0
0
255
255
255
255
0
0
0
0
0
0
255
255
255
0
5
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
8
8
~~
~~
0
0
0
0
0
3
3
0
3
0
-1
DBASE.AVI
0
8
5025
4635
4500
2085
0
0
0
0
BEGIN_TEXT
From this screen, you can plot any of the data in the database.
Click on the Plot button to display the rain and snow data for the year.
!
BEGIN_TEXT
!
Database Communication
0
0
0
0
255
255
255
255
0
0
0
0
0
0
255
255
255
0
5
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
8
8
~~
~~
0
0
0
0
0
3
3
0
3
0
-1
DBASE.AVI
0
10
930
3450
4530
1710
0
0
0
0
BEGIN_TEXT
As you can see, snowfall is displayed in red and rainfall in green.
Click on the arrow button to continue.
!
BEGIN_TEXT
!
Database Communication
0
0
0
0
255
255
255
255
0
0
0
0
0
0
255
255
255
0
5
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
8
8
~~
~~
-1
0
0
0
0
3
3
-1
3
0
0
DBASE.AVI
0
11
4590
3645
5550
2550
0
0
0
0
BEGIN_TEXT
You can also build custom queries for your data using the SQL Toolkit. From this screen you can specify which fields you would like to display, the time period over which you would like to search, and specific comparison criteria for your data. As you select options, you can see the SQL statement displayed at the bottom of the screen.
Click on the >>Add>> button to add to the SQL statement under construction.
!
BEGIN_TEXT
!
Database Communication
0
0
0
0
255
255
255
255
0
0
0
0
0
0
255
255
255
0
5
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
8
8
~~
~~
0
0
0
0
0
3
3
0
3
0
-1
DBASE.AVI
0
13
90
3975
5340
2160
0
0
0
0
BEGIN_TEXT
As you can see, you have added a query condition to the SQL statement: find only those days in which the high temperature was greater than 75 degrees. At the bottom of the screen, this query was added to the SELECT statement under construction.
Click on the arrow button to continue.
!
BEGIN_TEXT
!
Database Communication
0
0
0
0
255
255
255
255
0
0
0
0
0
0
255
255
255
0
5
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
8
8
~~
~~
0
0
0
0
0
3
3
-1
3
0
0
DBASE.AVI
0
15
750
3795
5340
1620
0
0
0
0
BEGIN_TEXT
Now you can set how the data should be sorted once it is found in the database.
Click on Temp - High in the SQL Fields control.
!
BEGIN_TEXT
!
Database Communication
0
0
0
0
255
255
255
255
0
0
0
0
0
0
255
255
255
0
5
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
8
8
~~
~~
0
0
0
0
0
3
3
0
3
0
-1
DBASE.AVI
0
17
750
3795
5340
1620
0
0
0
0
BEGIN_TEXT
Now click on Descending in the SQL Ordering control to specify that the high temperatures found above 75 degrees are to be sorted in descending order.
!
BEGIN_TEXT
!
Database Communication
0
0
0
0
255
255
255
255
0
0
0
0
0
0
255
255
255
0
5
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
8
8
~~
~~
0
0
0
0
0
3
3
0
3
0
-1
DBASE.AVI
0
19
750
3795
5340
1620
0
0
0
0
BEGIN_TEXT
Click on the >>Add>> button to add this condition to the SELECT statement.
!
BEGIN_TEXT
!
Database Communication
0
0
0
0
255
255
255
255
0
0
0
0
0
0
255
255
255
0
5
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
8
8
~~
~~
0
0
0
0
0
3
3
0
3
0
-1
DBASE.AVI
0
21
3765
5655
3750
1485
0
0
0
0
BEGIN_TEXT
Click on the Execute SQL to run the query on the weather data.
!
BEGIN_TEXT
!
Database Communication
0
0
0
0
255
255
255
255
0
0
0
0
0
0
255
255
255
0
5
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
8
8
~~
~~
0
0
0
0
0
3
3
0
3
0
-1
DBASE.AVI
0
23
2820
375
5325
2955
0
0
0
0
BEGIN_TEXT
The query results are displayed in a popup panel. The fields displayed are constructed automatically based on those chosen earlier. For this example, we only wanted to see the date and high temperature fields from the database records that meet our selection criteria. As you can see, June 14 was the hottest day of the year, with a high temperature of 82.2 degrees.
Press the Fetch Next button to see the next record found.
!
BEGIN_TEXT
!
Database Communication
0
0
0
0
255
255
255
255
0
0
0
0
0
0
255
255
255
0
5
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
8
8
~~
~~
0
0
0
0
0
3
3
0
3
0
-1
DBASE.AVI
0
25
2325
405
5325
2955
0
0
0
0
BEGIN_TEXT
As you can see from the sample application, you can build very flexible database applications with LabWindows/CVI and the SQL Toolkit. You can use the data acquisition capabilities of LabWindows/CVI to acquire data and store it in a database, or you can use the user interface capabilities to search, analyze, and display data from a database. To learn more about the SQL Toolkit, refer to the Toolkits section of this demonstration.