ODBC Query Plug-in Properties

The ODBC Query plug-in allows you to work with SQL databases by creating, updating, and deleting database records.

Note: A 64-bit Oracle Driver is required to use this plug-in.

Value Pair

Description

Mandatory

connectionstring

ODBC connection string to a database.

This should be a from Connection defined globally or for that app only.

Yes

escapesql

A Yes/No value that indicates whether or not the plug-ins should use escape apostrophes in the field values used for substitutions in the supplied query.  The default is No.

No
isstoredprocedure A Boolean expression indicating whether or not the value specified in the query argument is a database stored procedure. No
parameters A comma-separated list of parameters in the query. No
parametertypes A comma-separated list of parameter types in the query. Can be one of int16, uint16, int32, uint32, int64, uint64, decimal, double, bool, single, float, date, datetime, or string. No

query

The query string.

Yes
values A comma-separate list of values to bind to the parameters.  

Example 1: Insert a Record

  • connectionstring – DRIVER={SQL Server};SERVER=localhost;DATABASE=ws;UID=svdb;PWD=ws;OPTION=3
  • query – set quoted_identifier off; insert into EnvironmentalLog (ID, EquipName, ScrubFlow, PressDrop, Comments) values ('[formId]', '[EquipName]', '[ScrubFlow]', '[PressDrop]', '[Comments]')

Example 2: Update a Record

  • connectionstring – DRIVER={SQL Server};SERVER=localhost;DATABASE=ws;UID=svdb;PWD=ws;OPTION=3
  • query – set quoted_identifier off; update EnvironmentalLog set EquipName = '[EquipName]' where ID = '[//my:titleNum]' update EnvironmentalLog set PressDrop = '[PressDrop]' where ID = '[//my:titleNum]' update EnvironmentalLog set distComments = '[Comments]' where ID = '[//my:titleNum]'

Example 3: Delete a Record

  • connectionstring – DRIVER={SQL Server};SERVER=localhost;DATABASE=ws;UID=svdb;PWD=ws;OPTION=3
  • query – set quoted_identifier off; delete fromEnvironmentalLog where ID = '[//my:titleNum]'