|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2011-11-23 09:43 UTC] t dot ratschkowski at aswo dot com
Description:
------------
We cannot pass the i5_commit parameter to the db2_connect function. We got this
Warning and the parameter is ignored:
Warning: db2_connect() [function.db2-connect]: Incorrect option setting passed
Test script:
---------------
$options = array('i5_commit' => DB2_I5_TXN_READ_COMMITTED );
$db2string="DRIVER={IBM DB2 ODBC DRIVER};DATABASE=XXXX;HOSTNAME=xxx.xxxx.com;PORT=446;PROTOCOL=TCPIP;UID=USER;PWD=PASS";
$conn=db2_connect($db2string, "", "", $options);
if ($conn===false) {
die();
}
db2_close($conn);
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Wed Nov 12 16:00:01 2025 UTC |
Hi, thanks for the quick answer. In general, are this i5 parameters possible on the intel side? Or did the client drivers don't accept these parameters? I see in the case statement, the parameters are going to default case: (ibm_db2.c) else if (!STRCASECMP(opt_key, "i5_commit")) { pvParam = option_num; switch (option_num) { case DB2_I5_TXN_READ_UNCOMMITTED: case DB2_I5_TXN_READ_COMMITTED: case DB2_I5_TXN_REPEATABLE_READ: case DB2_I5_TXN_SERIALIZABLE: /* override commit in php.ini */ rc = SQLSetConnectAttr((SQLHDBC) ((conn_handle*)handle)->hdbc, SQL_ATTR_COMMIT, (SQLPOINTER)&pvParam, SQL_NTS); if ( rc == SQL_ERROR ) { _php_db2_check_sql_errors((SQLHSTMT) ((conn_handle*)handle)->hdbc, SQL_HANDLE_DBC, rc, 1, NULL, -1, 1 TSRMLS_CC); } break; case DB2_I5_TXN_NO_COMMIT: /* override commit in php.ini */ rc = SQLSetConnectAttr((SQLHDBC) ((conn_handle*)handle)->hdbc, SQL_ATTR_COMMIT, (SQLPOINTER)&pvParam, SQL_NTS); if ( rc == SQL_ERROR ) { _php_db2_check_sql_errors((SQLHSTMT) ((conn_handle*)handle)->hdbc, SQL_HANDLE_DBC, rc, 1, NULL, -1, 1 TSRMLS_CC); } break; default: php_error_docref(NULL TSRMLS_CC, E_WARNING, "i5_commit (DB2_I5_TXN_NO_COMMIT, DB2_I5_TXN_READ_UNCOMMITTED, DB2_I5_TXN_READ_COMMITTED, DB2_I5_TXN_REPEATABLE_READ, DB2_I5_TXN_SERIALIZABLE)"); }