Connection
CreateStatement
create a statement module
Calling Sequence
Parameters
Description
Examples
connection:-CreateStatement(opts)
connection
-
Connection module
opts
(optional) equations of the form option=integer where option is one of timeout, maxrows or maxfieldsize
CreateStatement opens a Statement module. This Statement module can be used to send arbitrary SQL statements to the database.
CreateStatement accepts as optional arguments the same options that can be set with Statement:-SetOptions.
timeout = integer
The number of seconds the client waits for a response from the database.
maxrows = integer
The maximum number of rows a query returns.
maxfieldsize = integer
The maximum number of bytes that a column uses to store character or binary data. This only applies to columns of type BINARY, VARBINARY, LONGVARBINARY, CHAR, VARCHAR, and LONGVARCHAR. If the limit is exceeded then the extra data is ignored.
driver≔DatabaseLoadDriver⁡:
conn≔driver:-OpenConnection⁡url,name,pass:
Create a statement with no options specified.
stat1≔conn:-CreateStatement⁡
stat1≔moduleoptionunload=Close;localhandle;exportExecute,NextResult,Close,SetOptions,GetOptions;end module
Create statements with various options.
stat2≔conn:-CreateStatement⁡timeout=10:stat3≔conn:-CreateStatement⁡timeout=5,maxrows=100:
See Also
Database
Database[Connection]
Database[Connection][CreatePreparedStatement]
Database[Connection][ExecuteQuery]
Database[Connection][ExecuteUpdate]
Database[PreparedStatement]
Database[Statement]
Database[usage]
Download Help Document