Download NJ5 SQL Connection for SQL Databases

Survey
yes no Was this document useful for you?
   Thank you for your participation!

* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project

Document related concepts

Concurrency control wikipedia , lookup

Microsoft Access wikipedia , lookup

Entity–attribute–value model wikipedia , lookup

Extensible Storage Engine wikipedia , lookup

Tandem Computers wikipedia , lookup

Ingres (database) wikipedia , lookup

Database wikipedia , lookup

Btrieve wikipedia , lookup

Oracle Database wikipedia , lookup

Microsoft Jet Database Engine wikipedia , lookup

Clusterpoint wikipedia , lookup

Database model wikipedia , lookup

Relational model wikipedia , lookup

Open Database Connectivity wikipedia , lookup

Microsoft SQL Server wikipedia , lookup

SQL wikipedia , lookup

PL/SQL wikipedia , lookup

Transcript
NJ5 SQL
Connection for SQL Databases
Jan 23rd 2014
Johnston Hall
Omron Automation and Safety
Confidential © Omron
1
NJ SQL has SQL Client Software
Built-in Database Connectivity allows the NJ SQL
to directly read and write data to a SQL database.
Ethernet
NJ5-1320/1420/1520
SQL running on a server
Confidential © Omron
2
Eliminates Middleware
No Middleware/PC
◦ No PC Maintenance
◦ Faster – Insert as fast as 20ms
Before
Confidential © Omron
3
Supports Most Popular SQL Databases
Works with:
• Oracle Database from Oracle Corporation
• SQL Server from Microsoft Corporation.
• MySQL from Oracle (Community Edition)
• IBM DB2 for Linux, Unix, and Windows
• Firebird 2.1, 2.5
Confidential © Omron
4
New Simple SQL Instructions
Easy SQL Language Instructions to append,
insert, update, or delete data.
Confidential © Omron
5
Advanced Debugging
NJ will log SQL events and errors to it’s SD card
for debugging.
Confidential © Omron
6
Data Saving Spooling Feature
In the event of communication loss to the SQL
server, data will be spooled in battery backed
memory.
• 1 Mbyte of battery backed spooling memory
• Auto or manual resend of data
Ethernet
Internal Spool
Confidential © Omron
7
Getting Started in 4 easy steps?
Confidential © Omron
8
Configure your Connections
Easy to configure connection screen with test button.
Confidential © Omron
9
Use DB_Connect to Connect to Database
The DB_Connect and DB_Close instructions make it
easy to log into and out of the database.
The SQL_DBConnection variable is used with all the
other instructions to indicate which connection to use.
Confidential © Omron
10
DB_CreatMapping to point to table and fields.
• Tablename is used to specify the table
• MapVar is the variable you want to send
• The Mapvar variable’s structure specifies the fields
The DB_CreateMapping instruction
specifies the database “table” to be
used, the variable to be mapped to the
fields, and if this vaiable is to be an
insert (_DBC_SQLTYPE_INSERT),
select (_DBC_SQLTYPE_SELECT),
update or delete.
Specify the table name
Create a variable for the data. The data
“type” is a structure that matches the
field names of the table. Up to 1000
fields.
You do not have to specify all the fields
in a table – just the ones you want to
use. The Select statement uses an
array variable for the multiple records
in the answer.
Confidential © Omron
11
Four new Instructions to move Data
• DB_Insert
• DB_Delete
• DB_Select
• DB_Update (write on top of existing data)
Confidential © Omron
12
Notes
• Up to 32 database instructions can be used at
one time.
• The “DB_Select” instruction supports wild cards
and Correlated Subqueries
Confidential © Omron
13
All NJ’s Get FTP Client
Old
• NJ has FTP server
• Computer has to figure out when to get file.
Computer asks for file
NJ Stores data to SD card
NJ Sends file to FTP server
New
• NJ has FTP client also
• Sends or gets file using FTP, computer has FTP server
Confidential © Omron
14