Help Center>Foundation Help

Applies to:

  • Winshuttle Foundation

ODBC Query plugin properties

The ODBC Query plugin 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 plugin.

Value Pair

Description

connectionstring

ODBC connection string to a database.

escapesql

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

query

Query to run on the database with the form data.

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]'