SetOptions - Maple Help
For the best experience, we recommend viewing online help using Google Chrome or Microsoft Edge.
Our website is currently undergoing maintenance, which may result in occasional errors while browsing. We apologize for any inconvenience this may cause and are working swiftly to restore full functionality. Thank you for your patience.

Online Help

PreparedStatement

  

SetOptions

  

set options of a PreparedStatement module

 

Calling Sequence

Parameters

Description

Examples

Calling Sequence

preparedstat:-SetOptions( opts )

Parameters

preparedstat

-

PreparedStatement module

opts

-

equation(s) of the form option=integer where option is one of timeout, maxrows, or maxfieldsize

Description

• 

SetOptions sets various options that affect the behavior of preparedstat.

• 

All the options that can be set with SetOptions can also be set when preparedstat is created by a call to CreateStatement.

• 

An option's current value can be obtained by calling GetOptions.

• 

SetOptions does not return anything.

• 

The following are the options that can be passed to SetOptions.

  

timeout = integer

  

the number of seconds preparedstat waits for a query to execute.  If the limit is exceeded, an error is raised.

  

maxrows = integer

  

the maximum number of rows a query returns. If there are more than maxrows rows in the database that match the query, the extra rows are dropped.

  

maxfieldsize = integer

  

the maximum number of bytes a field of type BINARY, VARBINARY, LONGVARBINARY, CHAR, VARCHAR, or LONGVARCHAR will use. If a field needs more than this, it is truncated.

• 

Calling SetOptions with no arguments raises an error.

Examples

driverDatabaseLoadDriver:

conndriver:-OpenConnectionurl,name,pass:pstatconn:-CreateStatement:pstat:-GetOptions

timeout=0,maxrows=0,maxfieldsize=8192

(1)

pstat:-SetOptionstimeout=10;pstat:-GetOptions

timeout=10,maxrows=0,maxfieldsize=8192

(2)

pstat:-SetOptionsmaxrows=20;pstat:-GetOptionstimeout,maxrows

timeout=10,maxrows=20

(3)

pstat:-SetOptionsmaxfieldsize=1000;pstat:-GetOptionstimeout,maxrows,maxfieldsize

timeout=10,maxrows=20,maxfieldsize=1000

(4)

See Also

Database

Database[Connection]

Database[Connection][CreateStatement]

Database[PreparedStatement]

Database[PreparedStatement][GetOptions]

Database[Statement]

Database[usage]

 


Download Help Document