ExecuteQueryCached

(ODBC Manager Library)

Description:              Called to send an SQL command to the server and get a reply back.  This module will cache the query locally if it fails & send it to the db after the next successful transaction with the db.  This module was designed to be used for logging values that cannot be lost.

Returns:                0 upon query execution starting.  See the following comments.

Usage:                       Script

Format:                      \ODBCManager\ExecuteQueryCached(ErrPtrCmdStr,  DSN,  UserName,  Password[,  BatchSize])

Parameters:             ErrPtr    { pointer }  { required }  { no default: }

                             Pointer to an error. Always valid on completion. Set to 0 if the command succeeds.

                             CmdStr                  { text }  { required }  { no default: }

                             The SQL command to send to the database

                             DSN             { text }  { required }  { no default: }

                             The name of the ODBC database in which to execute the command.

                             UserName    { text }  { required }  { no default: }

                             The user name in the database for authentication. A null provided in this field will be passed to the database as a null string.

                             Password     { text }  { required }  { no default: }

                             The password in the database for authentication. A null provided in this field will be passed to the database as a null string.

                             BatchSize     { numeric }  { optional }  { no default: }

                             The number of array entries to send in one batch

Returns:                0 upon query execution starting.  See the following comments.

Comments:               This module is a member of the ODBCManager Library, and must therefore be prefaced by \ODBCManager\, as shown in "Format" above.

                                    This module MUST be called as a subroutine in a script.  Completed execution of the query is indicated by a valid value set in the variable pointed to by parameter “ErrPtr”.  For this reason the variable referenced by “ErrPtr” MUST be invalidated before calling the function.