Lines Matching refs:rc
61 SQLRETURN rc; in pdo_odbc_error() local
92 rc = SQLGetDiagRec(htype, eh, recno++, einfo->last_state, &einfo->last_error, in pdo_odbc_error()
95 if (rc != SQL_SUCCESS && rc != SQL_SUCCESS_WITH_INFO) { in pdo_odbc_error()
116 while (rc == SQL_SUCCESS || rc == SQL_SUCCESS_WITH_INFO) { in pdo_odbc_error()
120 rc = SQLGetDiagRec(htype, eh, recno++, discard_state, &code, in pdo_odbc_error()
147 RETCODE rc; in odbc_handle_preparer() local
173 rc = SQLAllocHandle(SQL_HANDLE_STMT, H->dbc, &S->stmt); in odbc_handle_preparer()
175 if (rc == SQL_INVALID_HANDLE || rc == SQL_ERROR) { in odbc_handle_preparer()
186 rc = SQLSetStmtAttr(S->stmt, SQL_ATTR_CURSOR_SCROLLABLE, (void*)SQL_SCROLLABLE, 0); in odbc_handle_preparer()
187 if (rc != SQL_SUCCESS && rc != SQL_SUCCESS_WITH_INFO) { in odbc_handle_preparer()
197 rc = SQLPrepare(S->stmt, (char*)sql, SQL_NTS); in odbc_handle_preparer()
205 if (rc != SQL_SUCCESS) { in odbc_handle_preparer()
207 if (rc != SQL_SUCCESS_WITH_INFO) { in odbc_handle_preparer()
217 if (rc != SQL_SUCCESS && rc != SQL_SUCCESS_WITH_INFO) { in odbc_handle_preparer()
226 RETCODE rc; in odbc_handle_doer() local
230 rc = SQLAllocHandle(SQL_HANDLE_STMT, H->dbc, &stmt); in odbc_handle_doer()
231 if (rc != SQL_SUCCESS) { in odbc_handle_doer()
236 rc = SQLExecDirect(stmt, (char *)sql, sql_len); in odbc_handle_doer()
238 if (rc == SQL_NO_DATA) { in odbc_handle_doer()
246 if (rc != SQL_SUCCESS && rc != SQL_SUCCESS_WITH_INFO) { in odbc_handle_doer()
251 rc = SQLRowCount(stmt, &row_count); in odbc_handle_doer()
252 if (rc != SQL_SUCCESS && rc != SQL_SUCCESS_WITH_INFO) { in odbc_handle_doer()
275 RETCODE rc; in odbc_handle_begin() local
278 …rc = SQLSetConnectAttr(H->dbc, SQL_ATTR_AUTOCOMMIT, (SQLPOINTER)SQL_AUTOCOMMIT_OFF, SQL_IS_INTEGER… in odbc_handle_begin()
279 if (rc != SQL_SUCCESS) { in odbc_handle_begin()
290 RETCODE rc; in odbc_handle_commit() local
292 rc = SQLEndTran(SQL_HANDLE_DBC, H->dbc, SQL_COMMIT); in odbc_handle_commit()
294 if (rc != SQL_SUCCESS) { in odbc_handle_commit()
297 if (rc != SQL_SUCCESS_WITH_INFO) { in odbc_handle_commit()
304 …rc = SQLSetConnectAttr(H->dbc, SQL_ATTR_AUTOCOMMIT, (SQLPOINTER)SQL_AUTOCOMMIT_ON, SQL_IS_INTEGER); in odbc_handle_commit()
305 if (rc != SQL_SUCCESS) { in odbc_handle_commit()
316 RETCODE rc; in odbc_handle_rollback() local
318 rc = SQLEndTran(SQL_HANDLE_DBC, H->dbc, SQL_ROLLBACK); in odbc_handle_rollback()
320 if (rc != SQL_SUCCESS) { in odbc_handle_rollback()
323 if (rc != SQL_SUCCESS_WITH_INFO) { in odbc_handle_rollback()
329 …rc = SQLSetConnectAttr(H->dbc, SQL_ATTR_AUTOCOMMIT, (SQLPOINTER)SQL_AUTOCOMMIT_ON, SQL_IS_INTEGER); in odbc_handle_rollback()
330 if (rc != SQL_SUCCESS) { in odbc_handle_rollback()
394 RETCODE rc; in pdo_odbc_handle_factory() local
403 rc = SQLSetEnvAttr(H->env, SQL_ATTR_ODBC_VERSION, (void*)SQL_OV_ODBC3, 0); in pdo_odbc_handle_factory()
405 if (rc != SQL_SUCCESS && rc != SQL_SUCCESS_WITH_INFO) { in pdo_odbc_handle_factory()
412 rc = SQLSetEnvAttr(H->env, SQL_ATTR_CP_MATCH, (void*)pdo_odbc_pool_mode, 0); in pdo_odbc_handle_factory()
413 if (rc != SQL_SUCCESS) { in pdo_odbc_handle_factory()
420 rc = SQLAllocHandle(SQL_HANDLE_DBC, H->env, &H->dbc); in pdo_odbc_handle_factory()
421 if (rc != SQL_SUCCESS && rc != SQL_SUCCESS_WITH_INFO) { in pdo_odbc_handle_factory()
426 rc = SQLSetConnectAttr(H->dbc, SQL_ATTR_AUTOCOMMIT, in pdo_odbc_handle_factory()
428 if (rc != SQL_SUCCESS) { in pdo_odbc_handle_factory()
435 rc = SQLSetConnectAttr(H->dbc, SQL_ODBC_CURSORS, (void*)cursor_lib, SQL_IS_INTEGER); in pdo_odbc_handle_factory()
436 if (rc != SQL_SUCCESS && cursor_lib != SQL_CUR_USE_IF_NEEDED) { in pdo_odbc_handle_factory()
456 rc = SQLDriverConnect(H->dbc, NULL, (char*)dbh->data_source, strlen(dbh->data_source), in pdo_odbc_handle_factory()
460 …rc = SQLConnect(H->dbc, (char*)dbh->data_source, SQL_NTS, dbh->username, SQL_NTS, dbh->password, S… in pdo_odbc_handle_factory()
463 if (rc != SQL_SUCCESS && rc != SQL_SUCCESS_WITH_INFO) { in pdo_odbc_handle_factory()