The deprecated functions have a test case of their own.
Michael Paquier
test_connect();
- rc = SQLAllocStmt(conn, &hstmt);
+ rc = SQLAllocHandle(SQL_HANDLE_STMT, conn, &hstmt);
if (!SQL_SUCCEEDED(rc))
{
print_diag("failed to allocate stmt handle", SQL_HANDLE_DBC, conn);
test_connect();
- rc = SQLAllocStmt(conn, &hstmt);
+ rc = SQLAllocHandle(SQL_HANDLE_STMT, conn, &hstmt);
if (!SQL_SUCCEEDED(rc))
{
print_diag("failed to allocate stmt handle", SQL_HANDLE_DBC, conn);
rc = SQLFreeHandle(SQL_HANDLE_STMT, hstmt);
CHECK_STMT_RESULT(rc, "SQLFreeHandle failed", hstmt);
- rc = SQLAllocStmt(conn, &hstmt);
+ rc = SQLAllocHandle(SQL_HANDLE_STMT, conn, &hstmt);
if (!SQL_SUCCEEDED(rc))
{
print_diag("failed to allocate stmt handle", SQL_HANDLE_DBC, conn);
rc = SQLFreeHandle(SQL_HANDLE_STMT, hstmt);
CHECK_STMT_RESULT(rc, "SQLFreeHandle failed", hstmt);
- rc = SQLAllocStmt(conn, &hstmt);
+ rc = SQLAllocHandle(SQL_HANDLE_STMT, conn, &hstmt);
if (!SQL_SUCCEEDED(rc))
{
print_diag("failed to allocate stmt handle", SQL_HANDLE_DBC, conn);
test_connect();
- rc = SQLAllocStmt(conn, &hstmt);
+ rc = SQLAllocHandle(SQL_HANDLE_STMT, conn, &hstmt);
if (!SQL_SUCCEEDED(rc))
{
print_diag("failed to allocate stmt handle", SQL_HANDLE_DBC, conn);
/* BoolsAsChar is the default, but just in case.. */
test_connect_ext("BoolsAsChar=1;UseServerSidePrepare=1");
- rc = SQLAllocStmt(conn, &hstmt);
+ rc = SQLAllocHandle(SQL_HANDLE_STMT, conn, &hstmt);
if (!SQL_SUCCEEDED(rc))
{
print_diag("failed to allocate stmt handle", SQL_HANDLE_DBC, conn);
test_connect();
- rc = SQLAllocStmt(conn, &hstmt);
+ rc = SQLAllocHandle(SQL_HANDLE_STMT, conn, &hstmt);
if (!SQL_SUCCEEDED(rc))
{
print_diag("failed to allocate stmt handle", SQL_HANDLE_DBC, conn);
test_connect();
- rc = SQLAllocStmt(conn, &hstmt);
+ rc = SQLAllocHandle(SQL_HANDLE_STMT, conn, &hstmt);
if (!SQL_SUCCEEDED(rc))
{
print_diag("failed to allocate stmt handle", SQL_HANDLE_DBC, conn);
rc = SQLFreeHandle(SQL_HANDLE_DBC, conn);
if (!SQL_SUCCEEDED(rc))
{
- print_diag("SQLFreeConnect failed", SQL_HANDLE_DBC, conn);
+ print_diag("SQLFreeHandle failed", SQL_HANDLE_DBC, conn);
exit(1);
}
conn = NULL;
rc = SQLFreeHandle(SQL_HANDLE_ENV, env);
if (!SQL_SUCCEEDED(rc))
{
- print_diag("SQLFreeEnv failed", SQL_HANDLE_ENV, env);
+ print_diag("SQLFreeHandle failed", SQL_HANDLE_ENV, env);
exit(1);
}
env = NULL;
*/
test_connect_ext("UseDeclareFetch=0");
- rc = SQLAllocStmt(conn, &hstmt);
+ rc = SQLAllocHandle(SQL_HANDLE_STMT, conn, &hstmt);
if (!SQL_SUCCEEDED(rc))
{
print_diag("failed to allocate stmt handle", SQL_HANDLE_DBC, conn);
/**** And then the same with UseDeclareFetch = 1 ****/
test_connect_ext("UseDeclareFetch=1;Fetch=1");
- rc = SQLAllocStmt(conn, &hstmt);
+ rc = SQLAllocHandle(SQL_HANDLE_STMT, conn, &hstmt);
if (!SQL_SUCCEEDED(rc))
{
print_diag("failed to allocate stmt handle", SQL_HANDLE_DBC, conn);
test_connect();
- rc = SQLAllocStmt(conn, &hstmt);
+ rc = SQLAllocHandle(SQL_HANDLE_STMT, conn, &hstmt);
if (!SQL_SUCCEEDED(rc))
{
print_diag("failed to allocate stmt handle", SQL_HANDLE_DBC, conn);
test_connect_ext("AB=0x08;UseServerSidePrepare=1");
- rc = SQLAllocStmt(conn, &hstmt);
+ rc = SQLAllocHandle(SQL_HANDLE_STMT, conn, &hstmt);
if (!SQL_SUCCEEDED(rc))
{
print_diag("failed to allocate stmt handle", SQL_HANDLE_DBC, conn);
test_connect();
- rc = SQLAllocStmt(conn, &hstmt);
+ rc = SQLAllocHandle(SQL_HANDLE_STMT, conn, &hstmt);
if (!SQL_SUCCEEDED(rc))
{
print_diag("failed to allocate stmt handle", SQL_HANDLE_DBC, conn);
/* Grab new connection and handle for the next tests */
test_connect();
- rc = SQLAllocStmt(conn, &hstmt);
+ rc = SQLAllocHandle(SQL_HANDLE_STMT, conn, &hstmt);
if (!SQL_SUCCEEDED(rc))
{
print_diag("failed to allocate stmt handle", SQL_HANDLE_DBC, conn);
test_connect();
- rc = SQLAllocStmt(conn, &hstmt);
+ rc = SQLAllocHandle(SQL_HANDLE_STMT, conn, &hstmt);
if (!SQL_SUCCEEDED(rc))
{
print_diag("failed to allocate stmt handle", SQL_HANDLE_DBC, conn);
test_connect();
- rc = SQLAllocStmt(conn, &hstmt);
+ rc = SQLAllocHandle(SQL_HANDLE_STMT, conn, &hstmt);
if (!SQL_SUCCEEDED(rc))
{
print_diag("failed to allocate stmt handle", SQL_HANDLE_DBC, conn);
CHECK_STMT_RESULT(rc, "SQLFreeStmt failed", hstmt);
}
- rc = SQLFreeStmt(hstmt, SQL_DROP);
+ rc = SQLFreeHandle(SQL_HANDLE_STMT, hstmt);
if (!SQL_SUCCEEDED(rc))
{
- print_diag("SQLFreeStmt failed", SQL_HANDLE_STMT, hstmt);
+ print_diag("SQLFreeHandle failed", SQL_HANDLE_STMT, hstmt);
exit(1);
}
/* Enable LF -> CR+LF conversion */
test_connect_ext("CX=1");
- rc = SQLAllocStmt(conn, &hstmt);
+ rc = SQLAllocHandle(SQL_HANDLE_STMT, conn, &hstmt);
if (!SQL_SUCCEEDED(rc))
{
print_diag("failed to allocate stmt handle", SQL_HANDLE_DBC, conn);
test_connect();
- rc = SQLAllocStmt(conn, &hstmt);
+ rc = SQLAllocHandle(SQL_HANDLE_STMT, conn, &hstmt);
if (!SQL_SUCCEEDED(rc))
{
print_diag("failed to allocate stmt handle", SQL_HANDLE_DBC, conn);
test_connect();
- rc = SQLAllocStmt(conn, &hstmt);
+ rc = SQLAllocHandle(SQL_HANDLE_STMT, conn, &hstmt);
if (!SQL_SUCCEEDED(rc))
{
print_diag("failed to allocate stmt handle", SQL_HANDLE_DBC, conn);
if (rc == SQL_SUCCESS_WITH_INFO)
print_diag("got SUCCESS_WITH_INFO", SQL_HANDLE_STMT, hstmt);
- rc = SQLFreeStmt(hstmt, SQL_DROP);
+ rc = SQLFreeHandle(SQL_HANDLE_STMT, hstmt);
if (!SQL_SUCCEEDED(rc))
{
print_diag("SQLFreeStmt failed", SQL_HANDLE_STMT, hstmt);
test_connect();
- rc = SQLAllocStmt(conn, &hstmt);
+ rc = SQLAllocHandle(SQL_HANDLE_STMT, conn, &hstmt);
if (!SQL_SUCCEEDED(rc))
{
print_diag("failed to allocate stmt handle", SQL_HANDLE_DBC, conn);
test_connect();
- rc = SQLAllocStmt(conn, &hstmt);
+ rc = SQLAllocHandle(SQL_HANDLE_STMT, conn, &hstmt);
if (!SQL_SUCCEEDED(rc))
{
print_diag("failed to allocate stmt handle", SQL_HANDLE_DBC, conn);
test_connect();
- rc = SQLAllocStmt(conn, &hstmt);
+ rc = SQLAllocHandle(SQL_HANDLE_STMT, conn, &hstmt);
if (!SQL_SUCCEEDED(rc))
{
print_diag("failed to allocate stmt handle", SQL_HANDLE_DBC, conn);
/* Fetch result */
print_result(hstmt);
- rc = SQLFreeStmt(hstmt, SQL_DROP);
+ rc = SQLFreeHandle(SQL_HANDLE_STMT, hstmt);
if (!SQL_SUCCEEDED(rc))
{
print_diag("SQLFreeStmt failed", SQL_HANDLE_STMT, hstmt);
test_connect();
- rc = SQLAllocStmt(conn, &hstmt);
+ rc = SQLAllocHandle(SQL_HANDLE_STMT, conn, &hstmt);
if (!SQL_SUCCEEDED(rc))
{
print_diag("failed to allocate stmt handle", SQL_HANDLE_DBC, conn);
test_connect();
- rc = SQLAllocStmt(conn, &hstmt);
+ rc = SQLAllocHandle(SQL_HANDLE_STMT, conn, &hstmt);
if (!SQL_SUCCEEDED(rc))
{
print_diag("failed to allocate stmt handle", SQL_HANDLE_DBC, conn);
/* Allocate a lot of stmt handles */
for (i = 0; i < NUM_STMT_HANDLES; i++)
{
- rc = SQLAllocStmt(conn, &hstmt[i]);
+ rc = SQLAllocHandle(SQL_HANDLE_STMT, conn, &hstmt[i]);
if (!SQL_SUCCEEDED(rc))
{
printf("failed to allocate stmt handle %d\n", i + 1);