Database Communication Using LabVIEW Video PDF
Database Communication Using LabVIEW Video PDF
Communication
using LabVIEW
ODBC
Microsoft
SQL Server Write/Read Data
Database
Not too long ago, this was the only data-storage device most
companies needed. Those days are over.
Database Systems
• A Database is a structured way to store lots of information.
The information is stored in different tables.
• - “Everything” today is stored in databases!
Examples:
• Bank/Account systems
• Information in Web pages such as Facebook, Wikipedia,
YouTube, etc.
• … lots of other examples! (Give me 5 examples)
Database Management Systems (DBMS)
• Oracle
• MySQL
• MariaDB
• Sybase
• Microsoft Access
• Microsoft SQL Server
• ... (we have hundreds different DBMS)
SQL Server
the database from a client. You can use this standard to communicate with
databases from different vendors, such as Oracle, SQL Server, etc. The designers
of ODBC aimed to make it independent of programming languages, database
systems, and operating systems.
Control Panel → Administrative Tools → Data Sources (ODBC)
We will use this ODBC Connection later
in LabVIEW in order to open the
Database Connection from LabVIEW
© Hans-Petter Halvorsen
Download for free here:
http://home.hit.no/~hansha/documents/labview/code/SQLToolkit.zip
LabVIEW SQL Toolkit
Easy Access to Database Systems from
LabVIEW
Example 1: Get Data from Database into LabVIEW: 2D Table with Data
1 2 3
Query
Your ODBC
Connection Students: Try these Examples
Example 2: Write Data to Database from LabVIEW:
1 2 3
Query
23
Example 1: Get Data from Database
into LabVIEW
Lets Create the Example from Scratch
Example 2: Write Data to Database
from LabVIEW
Lets Create the Example from Scratch
Alternative Solution: Type in the
Connection String for your Database
Note! When using this method, you dont need to create an ODBC Connection first!
LabVIEW Example
Logging Measurements Data to SQL Server
30
Logging Measurement Data into
SQL Server Database
Lets Create the Example from Scratch
Hans-Petter Halvorsen, M.Sc.
E-mail: [email protected]
Blog: http://home.hit.no/~hansha/