Statement - Maple Programming Help

Online Help

All Products    Maple    MapleSim


Home : Support : Online Help : Connectivity : Database Package : Statement : Database/Statement/SetOptions

Statement

  

SetOptions

  

set options of a Statement module

 

Calling Sequence

Parameters

Description

Examples

Calling Sequence

statement:-SetOptions( opts )

Parameters

statement

-

Statement module

opts

-

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

Description

• 

SetOptions sets various options that affect the behavior of statement.

• 

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

• 

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

• 

SetOptions does not return anything.

• 

SetOptions accepts the following options.

  

timeout = integer

  

The number of seconds statement 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

driverDatabase[LoadDriver]:

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

timeout=0,maxrows=0,maxfieldsize=8192

(1)

stat:-SetOptions'timeout'=10;stat:-GetOptions

timeout=10,maxrows=0,maxfieldsize=8192

(2)

stat:-SetOptions'maxrows'=20;stat:-GetOptions'timeout','maxrows'

timeout=10,maxrows=20

(3)

stat:-SetOptions'maxfieldsize'=1000;stat:-GetOptions'timeout','maxrows','maxfieldsize'

timeout=10,maxrows=20,maxfieldsize=1000

(4)

See Also

Database

Database[Connection]

Database[Connection][CreateStatement]

Database[Statement]

Database[Statement][GetOptions]

Database[usage]

 


Download Help Document

Was this information helpful?



Please add your Comment (Optional)
E-mail Address (Optional)
What is ? This question helps us to combat spam