GetOptions - Maple Help
For the best experience, we recommend viewing online help using Google Chrome or Microsoft Edge.

Online Help

All Products    Maple    MapleSim


Statement

  

GetOptions

  

get options from a Statement module

 

Calling Sequence

Parameters

Description

Examples

Calling Sequence

statement:-GetOptions( opts )

Parameters

statement

-

Statement module

opts

-

(optional) name; the option to get, one of timeout, maxrows, or maxfieldsize

Description

• 

GetOptions gets the values of options that affect the behavior of statement.

• 

All the options that can be read with GetOptions can be set by calls to SetOptions or when the Statement is created by CreateStatement.

• 

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

• 

GetOptions recognizes the following options.

  

timeout

  

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

  

maxrows

  

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

  

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 GetOptions with no arguments returns the current values of all the arguments that GetOptions can query.

Examples

driverDatabaseLoadDriver:

conndriver:-OpenConnectionurl,name,pass:statconn:-CreateStatement:stat:-GetOptions

timeout=0,maxrows=0,maxfieldsize=8192

(1)

stat:-SetOptionstimeout=10;stat:-GetOptions

timeout=10,maxrows=0,maxfieldsize=8192

(2)

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

timeout=10,maxrows=20

(3)

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

timeout=10,maxrows=20,maxfieldsize=1000

(4)

See Also

Database

Database[Connection]

Database[Connection][CreateStatement]

Database[Statement]

Database[Statement][SetOptions]

Database[usage]