PreparedStatement - Maple Programming Help

Online Help

All Products    Maple    MapleSim


Home : Support : Online Help : Connectivity : Database Package : PreparedStatement : Database/PreparedStatement/GetOptions

PreparedStatement

  

GetOptions

  

get options of a PreparedStatement module

 

Calling Sequence

Parameters

Description

Examples

Calling Sequence

preparedstat:-GetOptions( opts )

Parameters

preparedstat

-

PreparedStatement 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 preparedstat.

• 

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

• 

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

• 

GetOptions recognizes the following options

  

timeout

  

the number of seconds preparedstat 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

driverDatabase[LoadDriver]:

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

timeout=0,maxrows=0,maxfieldsize=8192

(1)

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

timeout=10,maxrows=0,maxfieldsize=8192

(2)

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

timeout=10,maxrows=20

(3)

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

timeout=10,maxrows=20,maxfieldsize=1000

(4)

See Also

Database

Database[Connection]

Database[Connection][CreateStatement]

Database[PreparedStatement]

Database[PreparedStatement][SetOptions]

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