Example:
$newsize = 20480;
$rc = $db->SetMaxBufSize($newsize);
die qq(SetMaxBufSize($newsize) error: ), $db->Error, qq(\n) if ! $rc;
See also: GetMaxBufSize
Back to the top
SetStmtCloseType
type
Sets the current ODBC close type setting used by the ODBC Manager. This is used mainly for debugging. Normally, when you open a statement handle and perform a query (or whatever) the results are associated with the statement. You need to free the statement in order to execute another query. When you do this, usually the dataset (from the query) is cached. This caching action may be good for speed but could cause some memory problems if your dataset is huge. See the ODBC API call SQLFreeStmt(hstmt, option) for more details. (All of this is handled automatically by the Win32::ODBC package).
Type will be one of:
SQL_CLOSE - just close the statement (use caching)
SQL_DROP - close and drop all results (do not use caching)
SQL_UNBIND - close and remove bindings to columns (odbc.pll does not bind vars to columns)
SQL_RESET_PARAMS - close and reset all of the bound parameters (such as type casting for columns; see SQLFreeStmt())
Example:
$oldct = $db->GetStmtCloseType;
$db->SetStmtCloseType(SQL_DROP);
...
$db->SetStmtCloseType($oldct);
See also: GetStmtCloseType
Back to the top
ShutDown
Closes the ODBC connection and print data about it. This is used only in debugging.
Example:
$db->Shutdown;
See also: Close
Back to the top
Sql
stmt
Executes the SQL command stmt. Returns undef on success, SQL error code on failure.
Example:
$stmt = "SELECT * FROM foo";
$rc = $db->Sql($stmt);
die qq(SQL failed "$stmt": ), $db->Error(), qq(\n) if $rc;
See also: Error
Back to the top
TableList
TableList qualifier, owner, name, type
Retrieves the list of table names from the current ODBC object using Catalog. If not specified, qualifier and owner default to "", name defaults to "%", and type defaults to "'TABLE'". TableList returns an array of table names. Note:All fieldnames are uppercase!