您的位置:首页 >> Web开发 >> CGI技术 >> 正文
CGI技术 RSS
 

关于odbc的一个文挡说明,奉献给大家

http://www.rdxx.com 06年04月21日 07:27 网海之贝 我要投稿

关键词: 说明 , ODBC

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!
9 7 3 1 2 3 4 5 6 4 8 :

 
 
标签: 说明 , ODBC 打印本文
 
 
  热点搜索
 
 
 



Valid XHTML 1.0 Transitional
Copyright ©2005 - 2008 Rdxx.Com,All Rights Reserved
收藏本页
收藏本站