Siemens Industry Online Support
Siemens AG
Entry type: Application example Entry ID: 109479140, Entry date: 08/27/2015

SIMATIC ODK 1500S SQL driver

  • Entry
  • Associated product(s)
Connection of an SQL database to an S7-1500 Software Controller


This application example shows how to connect an S7-1500 Software Controller to an SQL database by means of the ODK 1500S SQL driver. The drivers allows a direct access to an SQL database from a STEP 7 application.



With the included function blocks it is possible to establish and close a connection to an SQL database, to read and write data and to edit an SQL database.  All prevalent standard data types are supported. The ODK1500S SQL driver uses the ODBC interface to connect to an sql database (local or remote).

As a user interface to the database, two function blocks are available. One function block enables to execute SQL statements (e.g. Select, Insert, Update, Delete) with flexible arguments.

The second function block can be used to write data from a data block into a database without using SQL statements.


More information about this driver can be obtained from the provided PDF-documents.


August 2015 V 1.0
  • First version
 June 2016 V1.1
  • Support of 64-bit floating point numbers
  • Direct input of SQL statements possible (Separation between data and string not necessary)
  • Generation of demo database via sql script
 July 2017


  • Implementation with ODK 1500S V2
  • New user interface
  • New function block for writing process data without SQL strings/statements
  • New function bock for executing SQL statements without arguments
  • Support of optimized data blocks
  • Support for additional data types (datetime, bit…)
  • SQL statements with up to 16000 characters in the user program
 August 2017


  • Support of unicode datatypes WString resp. nvarchar
  • Support of variable string length in read and write direction (up to 254 characters)
  • Increased data interface from 8kByte to 265 kByte (sqlArguments / sqlReceivedData)
  • Improved diagnostic with SQL Viewer
 Oktober 2018


  • new timeout parameter for FB Connect und ExecuteStatement
  • compatibility mode for MS SQL "datetime" datatype
  • Output of a warning as well as detail information via SQLViewer if a value with the content "NULL" is read out via a select statement
  • Bugfixes


If you are interested, please contact your local sales partner:
Contacts worldwide



 Registrierung notwendig  Documentation (2,8 MB)
  Flyer (145,9 KB)
  FAQ (645,6 KB)