Lines Matching refs:rc
387 RETCODE rc; in PHP_MINIT_FUNCTION() local
546 RETCODE rc; in odbc_sql_error() local
563 …rc = SQLError(henv, conn, stmt, (SQLCHAR *) ODBCG(laststate), &error, (SQLCHAR *) ODBCG(lasterrorm… in odbc_sql_error()
564 if (rc != SQL_SUCCESS && rc != SQL_SUCCESS_WITH_INFO) { in odbc_sql_error()
612 RETCODE rc; in odbc_bindcols() local
628 rc = PHP_ODBC_SQLCOLATTRIBUTE(result->stmt, (SQLUSMALLINT)(i+1), PHP_ODBC_SQL_DESC_NAME, in odbc_bindcols()
631 rc = PHP_ODBC_SQLCOLATTRIBUTE(result->stmt, (SQLUSMALLINT)(i+1), SQL_COLUMN_TYPE, in odbc_bindcols()
666 rc = PHP_ODBC_SQLCOLATTRIBUTE(result->stmt, (SQLUSMALLINT)(i+1), colfieldid, in odbc_bindcols()
668 if (rc != SQL_SUCCESS) { in odbc_bindcols()
672 if (rc != SQL_SUCCESS && rc != SQL_SUCCESS_WITH_INFO && colfieldid == SQL_DESC_OCTET_LENGTH) { in odbc_bindcols()
688 rc = SQLColAttributes(result->stmt, (SQLUSMALLINT)(i+1), SQL_COLUMN_DISPLAY_SIZE, in odbc_bindcols()
690 if (rc != SQL_SUCCESS) { in odbc_bindcols()
719 rc = SQLBindCol(result->stmt, (SQLUSMALLINT)(i+1), SQL_C_CHAR, result->values[i].value, in odbc_bindcols()
732 RETCODE rc; in odbc_transact() local
743 rc = SQLTransact(conn->henv, conn->hdbc, (SQLUSMALLINT)((type)?SQL_COMMIT:SQL_ROLLBACK)); in odbc_transact()
744 if (rc != SQL_SUCCESS && rc != SQL_SUCCESS_WITH_INFO) { in odbc_transact()
867 RETCODE rc; in PHP_FUNCTION() local
886 rc = PHP_ODBC_SQLALLOCSTMT(conn->hdbc, &(result->stmt)); in PHP_FUNCTION()
887 if (rc == SQL_INVALID_HANDLE) { in PHP_FUNCTION()
893 if (rc == SQL_ERROR) { in PHP_FUNCTION()
902 rc = SQLGetInfo(conn->hdbc, SQL_FETCH_DIRECTION, (void *) &scrollopts, sizeof(scrollopts), NULL); in PHP_FUNCTION()
903 if (rc == SQL_SUCCESS) { in PHP_FUNCTION()
915 rc = SQLPrepare(result->stmt, (SQLCHAR *) query, SQL_NTS); in PHP_FUNCTION()
916 switch (rc) { in PHP_FUNCTION()
944 …rc = SQLDescribeParam(result->stmt, (SQLUSMALLINT)(i+1), &result->param_info[i].sqltype, &result->… in PHP_FUNCTION()
946 if (rc == SQL_ERROR) { in PHP_FUNCTION()
992 RETCODE rc; in PHP_FUNCTION() local
1062 rc = SQLBindParameter(result->stmt, (SQLUSMALLINT)i, SQL_PARAM_INPUT, in PHP_FUNCTION()
1074 rc = SQLBindParameter(result->stmt, (SQLUSMALLINT)i, SQL_PARAM_INPUT, in PHP_FUNCTION()
1079 if (rc == SQL_ERROR) { in PHP_FUNCTION()
1088 rc = SQLFreeStmt(result->stmt, SQL_CLOSE); in PHP_FUNCTION()
1090 if (rc == SQL_ERROR) { in PHP_FUNCTION()
1095 rc = SQLExecute(result->stmt); in PHP_FUNCTION()
1096 switch (rc) { in PHP_FUNCTION()
1100 while (rc == SQL_NEED_DATA) { in PHP_FUNCTION()
1101 rc = SQLParamData(result->stmt, (void*)&fp); in PHP_FUNCTION()
1102 if (rc == SQL_NEED_DATA) { in PHP_FUNCTION()
1125 if (rc == SQL_SUCCESS || rc == SQL_SUCCESS_WITH_INFO || rc == SQL_NO_DATA_FOUND) { in PHP_FUNCTION()
1152 RETCODE rc; in PHP_FUNCTION() local
1162 …rc = SQLGetInfo(result->conn_ptr->hdbc,SQL_MAX_CURSOR_NAME_LEN, (void *)&max_len,sizeof(max_len),&… in PHP_FUNCTION()
1163 if (rc != SQL_SUCCESS && rc != SQL_SUCCESS_WITH_INFO) { in PHP_FUNCTION()
1169 rc = SQLGetCursorName(result->stmt, (SQLCHAR *) cursorname, (SQLSMALLINT)max_len, &len); in PHP_FUNCTION()
1170 if (rc != SQL_SUCCESS && rc != SQL_SUCCESS_WITH_INFO) { in PHP_FUNCTION()
1207 RETCODE rc = 0; /* assume all is good */ in PHP_FUNCTION() local
1228 rc = SQLDataSources(conn->henv, in PHP_FUNCTION()
1237 if (SQL_NO_DATA == rc) { in PHP_FUNCTION()
1241 } else if (rc != SQL_SUCCESS) { in PHP_FUNCTION()
1270 RETCODE rc; in PHP_FUNCTION() local
1285 rc = PHP_ODBC_SQLALLOCSTMT(conn->hdbc, &(result->stmt)); in PHP_FUNCTION()
1286 if (rc == SQL_INVALID_HANDLE) { in PHP_FUNCTION()
1292 if (rc == SQL_ERROR) { in PHP_FUNCTION()
1301 rc = SQLGetInfo(conn->hdbc, SQL_FETCH_DIRECTION, (void *) &scrollopts, sizeof(scrollopts), NULL); in PHP_FUNCTION()
1302 if (rc == SQL_SUCCESS) { in PHP_FUNCTION()
1314 rc = SQLExecDirect(result->stmt, (SQLCHAR *) query, SQL_NTS); in PHP_FUNCTION()
1315 if (rc != SQL_SUCCESS && rc != SQL_SUCCESS_WITH_INFO && rc != SQL_NO_DATA_FOUND) { in PHP_FUNCTION()
1352 RETCODE rc; in php_odbc_fetch_hash() local
1387 rc = SQLExtendedFetch(result->stmt,SQL_FETCH_ABSOLUTE,rownum,&crow,RowStatus); in php_odbc_fetch_hash()
1389 rc = SQLExtendedFetch(result->stmt,SQL_FETCH_NEXT,1,&crow,RowStatus); in php_odbc_fetch_hash()
1393 rc = SQLFetch(result->stmt); in php_odbc_fetch_hash()
1395 if (rc != SQL_SUCCESS && rc != SQL_SUCCESS_WITH_INFO) { in php_odbc_fetch_hash()
1434 …rc = SQLGetData(result->stmt, (SQLUSMALLINT)(i + 1), sql_c_type, buf, result->longreadlen + 1, &re… in php_odbc_fetch_hash()
1436 if (rc == SQL_ERROR) { in php_odbc_fetch_hash()
1442 if (rc == SQL_SUCCESS_WITH_INFO) { in php_odbc_fetch_hash()
1444 } else if (rc != SQL_SUCCESS) { in php_odbc_fetch_hash()
1445 php_error_docref(NULL, E_WARNING, "Cannot get data of column #%d (retcode %u)", i + 1, rc); in php_odbc_fetch_hash()
1511 RETCODE rc; in PHP_FUNCTION() local
1551 rc = SQLExtendedFetch(result->stmt,SQL_FETCH_ABSOLUTE,rownum,&crow,RowStatus); in PHP_FUNCTION()
1553 rc = SQLExtendedFetch(result->stmt,SQL_FETCH_NEXT,1,&crow,RowStatus); in PHP_FUNCTION()
1557 rc = SQLFetch(result->stmt); in PHP_FUNCTION()
1559 if (rc != SQL_SUCCESS && rc != SQL_SUCCESS_WITH_INFO) { in PHP_FUNCTION()
1595 …rc = SQLGetData(result->stmt, (SQLUSMALLINT)(i + 1),sql_c_type, buf, result->longreadlen + 1, &res… in PHP_FUNCTION()
1597 if (rc == SQL_ERROR) { in PHP_FUNCTION()
1602 if (rc == SQL_SUCCESS_WITH_INFO) { in PHP_FUNCTION()
1604 } else if (rc != SQL_SUCCESS) { in PHP_FUNCTION()
1605 php_error_docref(NULL, E_WARNING, "Cannot get data of column #%d (retcode %u)", i + 1, rc); in PHP_FUNCTION()
1642 RETCODE rc; in PHP_FUNCTION() local
1656 rc = SQLFetchPrev(result->stmt); in PHP_FUNCTION()
1658 if (rc != SQL_SUCCESS && rc != SQL_SUCCESS_WITH_INFO) { in PHP_FUNCTION()
1675 RETCODE rc; in PHP_FUNCTION() local
1700 rc = SQLExtendedFetch(result->stmt,SQL_FETCH_ABSOLUTE,(SQLLEN)pv_row,&crow,RowStatus); in PHP_FUNCTION()
1702 rc = SQLExtendedFetch(result->stmt,SQL_FETCH_NEXT,1,&crow,RowStatus); in PHP_FUNCTION()
1706 rc = SQLFetch(result->stmt); in PHP_FUNCTION()
1708 if (rc != SQL_SUCCESS && rc != SQL_SUCCESS_WITH_INFO) { in PHP_FUNCTION()
1732 RETCODE rc; in PHP_FUNCTION() local
1792 rc = SQLExtendedFetch(result->stmt, SQL_FETCH_NEXT, 1, &crow,RowStatus); in PHP_FUNCTION()
1795 rc = SQLFetch(result->stmt); in PHP_FUNCTION()
1797 if (rc != SQL_SUCCESS && rc != SQL_SUCCESS_WITH_INFO) { in PHP_FUNCTION()
1837 rc = SQLGetData(result->stmt, (SQLUSMALLINT)(field_ind + 1), sql_c_type, in PHP_FUNCTION()
1840 if (rc == SQL_ERROR) { in PHP_FUNCTION()
1846 if (rc != SQL_SUCCESS && rc != SQL_SUCCESS_WITH_INFO) { in PHP_FUNCTION()
1848 …php_error_docref(NULL, E_WARNING, "Cannot get data of column #%d (retcode %u)", field_ind + 1, rc); in PHP_FUNCTION()
1870 if (rc != SQL_SUCCESS_WITH_INFO) { in PHP_FUNCTION()
1897 …rc = SQLGetData(result->stmt, (SQLUSMALLINT)(field_ind + 1),sql_c_type, field, fieldsize, &result-… in PHP_FUNCTION()
1899 if (rc == SQL_ERROR) { in PHP_FUNCTION()
1905 if (rc != SQL_SUCCESS && rc != SQL_SUCCESS_WITH_INFO) { in PHP_FUNCTION()
1906 …php_error_docref(NULL, E_WARNING, "Cannot get data of column #%d (retcode %u)", field_ind + 1, rc); in PHP_FUNCTION()
1920 PHPWRITE(field,(rc == SQL_SUCCESS_WITH_INFO) ? 4095 : result->values[field_ind].vallen); in PHP_FUNCTION()
1922 if (rc == SQL_SUCCESS) { /* no more data avail */ in PHP_FUNCTION()
1936 RETCODE rc; in PHP_FUNCTION() local
1960 rc = SQLExtendedFetch(result->stmt,SQL_FETCH_NEXT,1,&crow,RowStatus); in PHP_FUNCTION()
1963 rc = SQLFetch(result->stmt); in PHP_FUNCTION()
1965 if (rc != SQL_SUCCESS && rc != SQL_SUCCESS_WITH_INFO) { in PHP_FUNCTION()
1983 while(rc == SQL_SUCCESS || rc == SQL_SUCCESS_WITH_INFO) { in PHP_FUNCTION()
2011 …rc = SQLGetData(result->stmt, (SQLUSMALLINT)(i + 1),sql_c_type, buf, result->longreadlen, &result-… in PHP_FUNCTION()
2015 if (rc == SQL_ERROR) { in PHP_FUNCTION()
2021 if (rc == SQL_SUCCESS_WITH_INFO) { in PHP_FUNCTION()
2030 } else if (rc != SQL_SUCCESS) { in PHP_FUNCTION()
2032 php_error_docref(NULL, E_WARNING, "Cannot get data of column #%zu (retcode %u)", i + 1, rc); in PHP_FUNCTION()
2059 rc = SQLExtendedFetch(result->stmt,SQL_FETCH_NEXT,1,&crow,RowStatus); in PHP_FUNCTION()
2062 rc = SQLFetch(result->stmt); in PHP_FUNCTION()
2118 RETCODE rc; in odbc_sqlconnect() local
2135 …rc = SQLDriverConnect((*conn)->hdbc, NULL, db, SQL_NTS, dsnbuf, sizeof(dsnbuf) - 1, &dsnbuflen, SQ… in odbc_sqlconnect()
2139 rc = SQLSetConnectOption((*conn)->hdbc, SQL_ODBC_CURSORS, cur_opt); in odbc_sqlconnect()
2140 if (rc != SQL_SUCCESS) { /* && rc != SQL_SUCCESS_WITH_INFO ? */ in odbc_sqlconnect()
2172 …rc = SQLDriverConnect((*conn)->hdbc, NULL, (SQLCHAR *) ldb, strlen(ldb), dsnbuf, sizeof(dsnbuf) - … in odbc_sqlconnect()
2174 …rc = SQLConnect((*conn)->hdbc, (SQLCHAR *) db, SQL_NTS, (SQLCHAR *) uid, SQL_NTS, (SQLCHAR *) pwd,… in odbc_sqlconnect()
2182 rc = SQLConnect((*conn)->hdbc, (SQLCHAR *) db, SQL_NTS, uid, SQL_NTS, pwd, SQL_NTS); in odbc_sqlconnect()
2185 if (rc != SQL_SUCCESS && rc != SQL_SUCCESS_WITH_INFO) { in odbc_sqlconnect()
2387 int rc, i; in PHP_FUNCTION() local
2409 rc = SQLMoreResults(result->stmt); in PHP_FUNCTION()
2410 if (rc == SQL_SUCCESS_WITH_INFO || rc == SQL_SUCCESS) { in PHP_FUNCTION()
2411 rc = SQLFreeStmt(result->stmt, SQL_UNBIND); in PHP_FUNCTION()
2424 } else if (rc == SQL_NO_DATA_FOUND) { in PHP_FUNCTION()
2577 RETCODE rc; in PHP_FUNCTION() local
2590 …rc = SQLSetConnectOption(conn->hdbc, SQL_AUTOCOMMIT, pv_onoff ? SQL_AUTOCOMMIT_ON : SQL_AUTOCOMMIT… in PHP_FUNCTION()
2591 if (rc != SQL_SUCCESS && rc != SQL_SUCCESS_WITH_INFO) { in PHP_FUNCTION()
2599 rc = SQLGetConnectOption(conn->hdbc, SQL_AUTOCOMMIT, (PTR)&status); in PHP_FUNCTION()
2600 if (rc != SQL_SUCCESS && rc != SQL_SUCCESS_WITH_INFO) { in PHP_FUNCTION()
2680 RETCODE rc; in PHP_FUNCTION() local
2698 rc = SQLSetConnectOption(conn->hdbc, (unsigned short) pv_opt, pv_val); in PHP_FUNCTION()
2699 if (rc != SQL_SUCCESS && rc != SQL_SUCCESS_WITH_INFO) { in PHP_FUNCTION()
2709 rc = SQLSetStmtOption(result->stmt, (unsigned short) pv_opt, pv_val); in PHP_FUNCTION()
2711 if (rc != SQL_SUCCESS && rc != SQL_SUCCESS_WITH_INFO) { in PHP_FUNCTION()
2737 RETCODE rc; in PHP_FUNCTION() local
2750 rc = PHP_ODBC_SQLALLOCSTMT(conn->hdbc, &(result->stmt)); in PHP_FUNCTION()
2751 if (rc == SQL_INVALID_HANDLE) { in PHP_FUNCTION()
2757 if (rc == SQL_ERROR) { in PHP_FUNCTION()
2768 rc = SQLTables(result->stmt, in PHP_FUNCTION()
2774 if (rc == SQL_ERROR) { in PHP_FUNCTION()
2805 RETCODE rc; in PHP_FUNCTION() local
2818 rc = PHP_ODBC_SQLALLOCSTMT(conn->hdbc, &(result->stmt)); in PHP_FUNCTION()
2819 if (rc == SQL_INVALID_HANDLE) { in PHP_FUNCTION()
2825 if (rc == SQL_ERROR) { in PHP_FUNCTION()
2838 rc = SQLColumns(result->stmt, in PHP_FUNCTION()
2844 if (rc == SQL_ERROR) { in PHP_FUNCTION()
2876 RETCODE rc; in PHP_FUNCTION() local
2889 rc = PHP_ODBC_SQLALLOCSTMT(conn->hdbc, &(result->stmt)); in PHP_FUNCTION()
2890 if (rc == SQL_INVALID_HANDLE) { in PHP_FUNCTION()
2896 if (rc == SQL_ERROR) { in PHP_FUNCTION()
2902 rc = SQLColumnPrivileges(result->stmt, in PHP_FUNCTION()
2908 if (rc == SQL_ERROR) { in PHP_FUNCTION()
2941 RETCODE rc; in PHP_FUNCTION() local
2966 rc = PHP_ODBC_SQLALLOCSTMT(conn->hdbc, &(result->stmt)); in PHP_FUNCTION()
2967 if (rc == SQL_INVALID_HANDLE) { in PHP_FUNCTION()
2973 if (rc == SQL_ERROR) { in PHP_FUNCTION()
2979 rc = SQLForeignKeys(result->stmt, in PHP_FUNCTION()
2987 if (rc == SQL_ERROR) { in PHP_FUNCTION()
3018 RETCODE rc; in PHP_FUNCTION() local
3033 rc = PHP_ODBC_SQLALLOCSTMT(conn->hdbc, &(result->stmt)); in PHP_FUNCTION()
3034 if (rc == SQL_INVALID_HANDLE) { in PHP_FUNCTION()
3040 if (rc == SQL_ERROR) { in PHP_FUNCTION()
3046 rc = SQLGetTypeInfo(result->stmt, data_type ); in PHP_FUNCTION()
3048 if (rc == SQL_ERROR) { in PHP_FUNCTION()
3079 RETCODE rc; in PHP_FUNCTION() local
3091 rc = PHP_ODBC_SQLALLOCSTMT(conn->hdbc, &(result->stmt)); in PHP_FUNCTION()
3092 if (rc == SQL_INVALID_HANDLE) { in PHP_FUNCTION()
3098 if (rc == SQL_ERROR) { in PHP_FUNCTION()
3104 rc = SQLPrimaryKeys(result->stmt, in PHP_FUNCTION()
3109 if (rc == SQL_ERROR) { in PHP_FUNCTION()
3141 RETCODE rc; in PHP_FUNCTION() local
3154 rc = PHP_ODBC_SQLALLOCSTMT(conn->hdbc, &(result->stmt)); in PHP_FUNCTION()
3155 if (rc == SQL_INVALID_HANDLE) { in PHP_FUNCTION()
3161 if (rc == SQL_ERROR) { in PHP_FUNCTION()
3167 rc = SQLProcedureColumns(result->stmt, in PHP_FUNCTION()
3173 if (rc == SQL_ERROR) { in PHP_FUNCTION()
3206 RETCODE rc; in PHP_FUNCTION() local
3218 rc = PHP_ODBC_SQLALLOCSTMT(conn->hdbc, &(result->stmt)); in PHP_FUNCTION()
3219 if (rc == SQL_INVALID_HANDLE) { in PHP_FUNCTION()
3225 if (rc == SQL_ERROR) { in PHP_FUNCTION()
3231 rc = SQLProcedures(result->stmt, in PHP_FUNCTION()
3236 if (rc == SQL_ERROR) { in PHP_FUNCTION()
3270 RETCODE rc; in PHP_FUNCTION() local
3287 rc = PHP_ODBC_SQLALLOCSTMT(conn->hdbc, &(result->stmt)); in PHP_FUNCTION()
3288 if (rc == SQL_INVALID_HANDLE) { in PHP_FUNCTION()
3294 if (rc == SQL_ERROR) { in PHP_FUNCTION()
3300 rc = SQLSpecialColumns(result->stmt, type, in PHP_FUNCTION()
3307 if (rc == SQL_ERROR) { in PHP_FUNCTION()
3340 RETCODE rc; in PHP_FUNCTION() local
3356 rc = PHP_ODBC_SQLALLOCSTMT(conn->hdbc, &(result->stmt)); in PHP_FUNCTION()
3357 if (rc == SQL_INVALID_HANDLE) { in PHP_FUNCTION()
3363 if (rc == SQL_ERROR) { in PHP_FUNCTION()
3369 rc = SQLStatistics(result->stmt, in PHP_FUNCTION()
3376 if (rc == SQL_ERROR) { in PHP_FUNCTION()
3408 RETCODE rc; in PHP_FUNCTION() local
3420 rc = PHP_ODBC_SQLALLOCSTMT(conn->hdbc, &(result->stmt)); in PHP_FUNCTION()
3421 if (rc == SQL_INVALID_HANDLE) { in PHP_FUNCTION()
3427 if (rc == SQL_ERROR) { in PHP_FUNCTION()
3433 rc = SQLTablePrivileges(result->stmt, in PHP_FUNCTION()
3438 if (rc == SQL_ERROR) { in PHP_FUNCTION()