Lines Matching refs:rc
57 SQLRETURN rc; in pdo_odbc_error() local
88 rc = SQLGetDiagRec(htype, eh, recno++, (SQLCHAR *) einfo->last_state, &einfo->last_error, in pdo_odbc_error()
91 if (rc != SQL_SUCCESS && rc != SQL_SUCCESS_WITH_INFO) { in pdo_odbc_error()
112 while (rc == SQL_SUCCESS || rc == SQL_SUCCESS_WITH_INFO) { in pdo_odbc_error()
116 rc = SQLGetDiagRec(htype, eh, recno++, discard_state, &code, in pdo_odbc_error()
141 RETCODE rc; in odbc_handle_preparer() local
166 rc = SQLAllocHandle(SQL_HANDLE_STMT, H->dbc, &S->stmt); in odbc_handle_preparer()
168 if (rc == SQL_INVALID_HANDLE || rc == SQL_ERROR) { in odbc_handle_preparer()
181 rc = SQLSetStmtAttr(S->stmt, SQL_ATTR_CURSOR_SCROLLABLE, (void*)SQL_SCROLLABLE, 0); in odbc_handle_preparer()
182 if (rc != SQL_SUCCESS && rc != SQL_SUCCESS_WITH_INFO) { in odbc_handle_preparer()
192 rc = SQLPrepare(S->stmt, (SQLCHAR *) ZSTR_VAL(sql), SQL_NTS); in odbc_handle_preparer()
199 if (rc != SQL_SUCCESS) { in odbc_handle_preparer()
201 if (rc != SQL_SUCCESS_WITH_INFO) { in odbc_handle_preparer()
211 if (rc != SQL_SUCCESS && rc != SQL_SUCCESS_WITH_INFO) { in odbc_handle_preparer()
220 RETCODE rc; in odbc_handle_doer() local
224 rc = SQLAllocHandle(SQL_HANDLE_STMT, H->dbc, &stmt); in odbc_handle_doer()
225 if (rc != SQL_SUCCESS && rc != SQL_SUCCESS_WITH_INFO) { in odbc_handle_doer()
230 rc = SQLExecDirect(stmt, (SQLCHAR *) ZSTR_VAL(sql), ZSTR_LEN(sql)); in odbc_handle_doer()
232 if (rc == SQL_NO_DATA) { in odbc_handle_doer()
240 if (rc != SQL_SUCCESS && rc != SQL_SUCCESS_WITH_INFO) { in odbc_handle_doer()
245 rc = SQLRowCount(stmt, &row_count); in odbc_handle_doer()
246 if (rc != SQL_SUCCESS && rc != SQL_SUCCESS_WITH_INFO) { in odbc_handle_doer()
271 RETCODE rc; in odbc_handle_begin() local
274 …rc = SQLSetConnectAttr(H->dbc, SQL_ATTR_AUTOCOMMIT, (SQLPOINTER)SQL_AUTOCOMMIT_OFF, SQL_IS_INTEGER… in odbc_handle_begin()
275 if (rc != SQL_SUCCESS) { in odbc_handle_begin()
286 RETCODE rc; in odbc_handle_commit() local
288 rc = SQLEndTran(SQL_HANDLE_DBC, H->dbc, SQL_COMMIT); in odbc_handle_commit()
290 if (rc != SQL_SUCCESS) { in odbc_handle_commit()
293 if (rc != SQL_SUCCESS_WITH_INFO) { in odbc_handle_commit()
300 …rc = SQLSetConnectAttr(H->dbc, SQL_ATTR_AUTOCOMMIT, (SQLPOINTER)SQL_AUTOCOMMIT_ON, SQL_IS_INTEGER); in odbc_handle_commit()
301 if (rc != SQL_SUCCESS) { in odbc_handle_commit()
312 RETCODE rc; in odbc_handle_rollback() local
314 rc = SQLEndTran(SQL_HANDLE_DBC, H->dbc, SQL_ROLLBACK); in odbc_handle_rollback()
316 if (rc != SQL_SUCCESS) { in odbc_handle_rollback()
319 if (rc != SQL_SUCCESS_WITH_INFO) { in odbc_handle_rollback()
325 …rc = SQLSetConnectAttr(H->dbc, SQL_ATTR_AUTOCOMMIT, (SQLPOINTER)SQL_AUTOCOMMIT_ON, SQL_IS_INTEGER); in odbc_handle_rollback()
326 if (rc != SQL_SUCCESS) { in odbc_handle_rollback()
357 RETCODE rc = SQLSetConnectAttr( in odbc_handle_set_attr() local
363 if (rc != SQL_SUCCESS) { in odbc_handle_set_attr()
381 RETCODE rc; in pdo_odbc_get_info_string() local
385 rc = SQLGetInfo(H->dbc, type, (SQLPOINTER)buf, sizeof(buf), &out_len); in pdo_odbc_get_info_string()
387 if (rc != SQL_SUCCESS && rc != SQL_SUCCESS_WITH_INFO) { in pdo_odbc_get_info_string()
470 RETCODE rc; in pdo_odbc_handle_factory() local
478 rc = SQLAllocHandle(SQL_HANDLE_ENV, SQL_NULL_HANDLE, &H->env); in pdo_odbc_handle_factory()
479 if (rc != SQL_SUCCESS && rc != SQL_SUCCESS_WITH_INFO) { in pdo_odbc_handle_factory()
484 rc = SQLSetEnvAttr(H->env, SQL_ATTR_ODBC_VERSION, (void*)SQL_OV_ODBC3, 0); in pdo_odbc_handle_factory()
486 if (rc != SQL_SUCCESS && rc != SQL_SUCCESS_WITH_INFO) { in pdo_odbc_handle_factory()
493 rc = SQLSetEnvAttr(H->env, SQL_ATTR_CP_MATCH, (void*)pdo_odbc_pool_mode, 0); in pdo_odbc_handle_factory()
494 if (rc != SQL_SUCCESS) { in pdo_odbc_handle_factory()
501 rc = SQLAllocHandle(SQL_HANDLE_DBC, H->env, &H->dbc); in pdo_odbc_handle_factory()
502 if (rc != SQL_SUCCESS && rc != SQL_SUCCESS_WITH_INFO) { in pdo_odbc_handle_factory()
507 rc = SQLSetConnectAttr(H->dbc, SQL_ATTR_AUTOCOMMIT, in pdo_odbc_handle_factory()
509 if (rc != SQL_SUCCESS) { in pdo_odbc_handle_factory()
516 rc = SQLSetConnectAttr(H->dbc, SQL_ODBC_CURSORS, (void*)cursor_lib, SQL_IS_INTEGER); in pdo_odbc_handle_factory()
517 if (rc != SQL_SUCCESS && cursor_lib != SQL_CUR_USE_IF_NEEDED) { in pdo_odbc_handle_factory()
569 rc = SQLDriverConnect(H->dbc, NULL, (SQLCHAR *) dbh->data_source, strlen(dbh->data_source), in pdo_odbc_handle_factory()
573 …rc = SQLConnect(H->dbc, (SQLCHAR *) dbh->data_source, SQL_NTS, (SQLCHAR *) dbh->username, SQL_NTS,… in pdo_odbc_handle_factory()
576 if (rc != SQL_SUCCESS && rc != SQL_SUCCESS_WITH_INFO) { in pdo_odbc_handle_factory()