odbc_setoption
调整 ODBC 配置。 
语法: int odbc_setoption(int id, int function, int option, int param); 
返回值: 整数 
函数种类: 数据库功能 
 本函数用来调整 ODBC 的配置值。参数 id 不一定指 connection_id,SQLSetConnectOption() 则为 connection_id;若为 SQLSetStmtOption() 则为 result_id。参数 function 值为 1 表 SQLSetConnectOption();若为 2 则为 SQLSetStmtOption()。参数 option 为配置的选项。参数 param 为配置值。 
 
<? // 例一: 配置为 autocommit,即与 odbc_autocommit($conn, true) 相同。 //       第三个参数值 102 表 SQL_AUTOCOMMIT。 //       第四个参数值 1 表 SQL_AUTOCOMMIT_ON。 odbc_setoption ($conn, 1, 102, 1); // 例二: 配置查询时间 //       第三个参数 0 表 SQL_QUERY_TIMEOUT //       第四个参数为最久执行时间,本例设为 30 秒 $result = odbc_prepare ($conn, $sql); odbc_setoption ($result, 2, 0, 30); odbc_execute ($result); ?>
 
 
  |