Lines Matching refs:rc
55 SQLRETURN rc; in pdo_odbc_error() local
86 rc = SQLGetDiagRec(htype, eh, recno++, (SQLCHAR *) einfo->last_state, &einfo->last_error, in pdo_odbc_error()
89 if (rc != SQL_SUCCESS && rc != SQL_SUCCESS_WITH_INFO) { in pdo_odbc_error()
110 while (rc == SQL_SUCCESS || rc == SQL_SUCCESS_WITH_INFO) { in pdo_odbc_error()
114 rc = SQLGetDiagRec(htype, eh, recno++, discard_state, &code, in pdo_odbc_error()
139 RETCODE rc; in odbc_handle_preparer() local
164 rc = SQLAllocHandle(SQL_HANDLE_STMT, H->dbc, &S->stmt); in odbc_handle_preparer()
166 if (rc == SQL_INVALID_HANDLE || rc == SQL_ERROR) { in odbc_handle_preparer()
179 rc = SQLSetStmtAttr(S->stmt, SQL_ATTR_CURSOR_SCROLLABLE, (void*)SQL_SCROLLABLE, 0); in odbc_handle_preparer()
180 if (rc != SQL_SUCCESS && rc != SQL_SUCCESS_WITH_INFO) { in odbc_handle_preparer()
190 rc = SQLPrepare(S->stmt, (SQLCHAR *) ZSTR_VAL(sql), SQL_NTS); in odbc_handle_preparer()
197 if (rc != SQL_SUCCESS) { in odbc_handle_preparer()
199 if (rc != SQL_SUCCESS_WITH_INFO) { in odbc_handle_preparer()
209 if (rc != SQL_SUCCESS && rc != SQL_SUCCESS_WITH_INFO) { in odbc_handle_preparer()
218 RETCODE rc; in odbc_handle_doer() local
222 rc = SQLAllocHandle(SQL_HANDLE_STMT, H->dbc, &stmt); in odbc_handle_doer()
223 if (rc != SQL_SUCCESS && rc != SQL_SUCCESS_WITH_INFO) { in odbc_handle_doer()
228 rc = SQLExecDirect(stmt, (SQLCHAR *) ZSTR_VAL(sql), ZSTR_LEN(sql)); in odbc_handle_doer()
230 if (rc == SQL_NO_DATA) { in odbc_handle_doer()
238 if (rc != SQL_SUCCESS && rc != SQL_SUCCESS_WITH_INFO) { in odbc_handle_doer()
243 rc = SQLRowCount(stmt, &row_count); in odbc_handle_doer()
244 if (rc != SQL_SUCCESS && rc != SQL_SUCCESS_WITH_INFO) { in odbc_handle_doer()
269 RETCODE rc; in odbc_handle_begin() local
272 …rc = SQLSetConnectAttr(H->dbc, SQL_ATTR_AUTOCOMMIT, (SQLPOINTER)SQL_AUTOCOMMIT_OFF, SQL_IS_INTEGER… in odbc_handle_begin()
273 if (rc != SQL_SUCCESS) { in odbc_handle_begin()
284 RETCODE rc; in odbc_handle_commit() local
286 rc = SQLEndTran(SQL_HANDLE_DBC, H->dbc, SQL_COMMIT); in odbc_handle_commit()
288 if (rc != SQL_SUCCESS) { in odbc_handle_commit()
291 if (rc != SQL_SUCCESS_WITH_INFO) { in odbc_handle_commit()
298 …rc = SQLSetConnectAttr(H->dbc, SQL_ATTR_AUTOCOMMIT, (SQLPOINTER)SQL_AUTOCOMMIT_ON, SQL_IS_INTEGER); in odbc_handle_commit()
299 if (rc != SQL_SUCCESS) { in odbc_handle_commit()
310 RETCODE rc; in odbc_handle_rollback() local
312 rc = SQLEndTran(SQL_HANDLE_DBC, H->dbc, SQL_ROLLBACK); in odbc_handle_rollback()
314 if (rc != SQL_SUCCESS) { in odbc_handle_rollback()
317 if (rc != SQL_SUCCESS_WITH_INFO) { in odbc_handle_rollback()
323 …rc = SQLSetConnectAttr(H->dbc, SQL_ATTR_AUTOCOMMIT, (SQLPOINTER)SQL_AUTOCOMMIT_ON, SQL_IS_INTEGER); in odbc_handle_rollback()
324 if (rc != SQL_SUCCESS) { in odbc_handle_rollback()
355 RETCODE rc; in pdo_odbc_get_info_string() local
359 rc = SQLGetInfo(H->dbc, type, (SQLPOINTER)buf, sizeof(buf), &out_len); in pdo_odbc_get_info_string()
361 if (rc != SQL_SUCCESS && rc != SQL_SUCCESS_WITH_INFO) { in pdo_odbc_get_info_string()
434 RETCODE rc; in pdo_odbc_handle_factory() local
442 rc = SQLAllocHandle(SQL_HANDLE_ENV, SQL_NULL_HANDLE, &H->env); in pdo_odbc_handle_factory()
443 if (rc != SQL_SUCCESS && rc != SQL_SUCCESS_WITH_INFO) { in pdo_odbc_handle_factory()
448 rc = SQLSetEnvAttr(H->env, SQL_ATTR_ODBC_VERSION, (void*)SQL_OV_ODBC3, 0); in pdo_odbc_handle_factory()
450 if (rc != SQL_SUCCESS && rc != SQL_SUCCESS_WITH_INFO) { in pdo_odbc_handle_factory()
457 rc = SQLSetEnvAttr(H->env, SQL_ATTR_CP_MATCH, (void*)pdo_odbc_pool_mode, 0); in pdo_odbc_handle_factory()
458 if (rc != SQL_SUCCESS) { in pdo_odbc_handle_factory()
465 rc = SQLAllocHandle(SQL_HANDLE_DBC, H->env, &H->dbc); in pdo_odbc_handle_factory()
466 if (rc != SQL_SUCCESS && rc != SQL_SUCCESS_WITH_INFO) { in pdo_odbc_handle_factory()
471 rc = SQLSetConnectAttr(H->dbc, SQL_ATTR_AUTOCOMMIT, in pdo_odbc_handle_factory()
473 if (rc != SQL_SUCCESS) { in pdo_odbc_handle_factory()
480 rc = SQLSetConnectAttr(H->dbc, SQL_ODBC_CURSORS, (void*)cursor_lib, SQL_IS_INTEGER); in pdo_odbc_handle_factory()
481 if (rc != SQL_SUCCESS && cursor_lib != SQL_CUR_USE_IF_NEEDED) { in pdo_odbc_handle_factory()
502 rc = SQLDriverConnect(H->dbc, NULL, (SQLCHAR *) dbh->data_source, strlen(dbh->data_source), in pdo_odbc_handle_factory()
506 …rc = SQLConnect(H->dbc, (SQLCHAR *) dbh->data_source, SQL_NTS, (SQLCHAR *) dbh->username, SQL_NTS,… in pdo_odbc_handle_factory()
509 if (rc != SQL_SUCCESS && rc != SQL_SUCCESS_WITH_INFO) { in pdo_odbc_handle_factory()