11.04.2013 Views

UniBasic Commands Reference - Rocket Software

UniBasic Commands Reference - Rocket Software

UniBasic Commands Reference - Rocket Software

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

SQLParamOptions<br />

Syntax<br />

status = SQLParamOptions (statement.env, option, value)<br />

Note: This function is case-sensitive. If you want it to be case-insensitive, you<br />

must compile your programs using the BASIC command with the -i option.<br />

Description<br />

SQLParamOptions lets applications load an array of parameter markers in a single<br />

SQLExecDirect or SQLExecute function call. Use this function only when you are<br />

connected to an ODBC data source.<br />

SQLParamOptions works for all parameter types—output and input/output parameters<br />

as well as the more usual input parameters.<br />

Be careful when you use matrices instead of arrays. For example, in the matrix:<br />

dim matrix(10,10)<br />

the elements 1,1, 1,2, ..., 1,10, 2,1, 2,2, ... occupy consecutive memory locations.<br />

Since SQLParamOptions requires each location specified in SQLBind Parameter to<br />

point to a consecutive series of values in memory, an application using a matrix must<br />

load the values of the matrix in the correct order.<br />

When the SQL statement is executed, all variables are checked, data is converted<br />

when necessary, and all values in the set are verified to be appropriate and within the<br />

bounds of the marker definition. Values are then copied to low-level structures<br />

associated with each parameter marker. If a failure occurs while the values are being<br />

checked, SQLExecDirect or SQLExecute returns SQL.ERROR, and value contains<br />

the number of the row where the failure occurred.<br />

1-838 <strong>UniBasic</strong> <strong>Commands</strong> <strong>Reference</strong>

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!