diff --git a/test/src/alter-test.c b/test/src/alter-test.c index b21a0b9..83991b8 100644 --- a/test/src/alter-test.c +++ b/test/src/alter-test.c @@ -10,7 +10,7 @@ int main(int argc, char **argv) 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); diff --git a/test/src/arraybinding-test.c b/test/src/arraybinding-test.c index 9fcbe97..4db3b9b 100644 --- a/test/src/arraybinding-test.c +++ b/test/src/arraybinding-test.c @@ -24,7 +24,7 @@ int main(int argc, char **argv) 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); @@ -100,7 +100,7 @@ int main(int argc, char **argv) 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); @@ -198,7 +198,7 @@ int main(int argc, char **argv) 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); diff --git a/test/src/bindcol-test.c b/test/src/bindcol-test.c index 0c0b42d..7220dcc 100644 --- a/test/src/bindcol-test.c +++ b/test/src/bindcol-test.c @@ -26,7 +26,7 @@ int main(int argc, char **argv) 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); diff --git a/test/src/boolsaschar-test.c b/test/src/boolsaschar-test.c index cd660f4..90c646e 100644 --- a/test/src/boolsaschar-test.c +++ b/test/src/boolsaschar-test.c @@ -16,7 +16,7 @@ int main(int argc, char **argv) /* 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); diff --git a/test/src/catalogfunctions-test.c b/test/src/catalogfunctions-test.c index 3d2d9ac..f45e7bf 100644 --- a/test/src/catalogfunctions-test.c +++ b/test/src/catalogfunctions-test.c @@ -33,7 +33,7 @@ main(int argc, char **argv) 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); diff --git a/test/src/commands-test.c b/test/src/commands-test.c index f0f11ca..96ca7ad 100644 --- a/test/src/commands-test.c +++ b/test/src/commands-test.c @@ -14,7 +14,7 @@ int main(int argc, char **argv) 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); diff --git a/test/src/common.c b/test/src/common.c index 904b10d..595bc42 100644 --- a/test/src/common.c +++ b/test/src/common.c @@ -71,7 +71,7 @@ test_disconnect(void) 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; @@ -79,7 +79,7 @@ test_disconnect(void) 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; diff --git a/test/src/cte-test.c b/test/src/cte-test.c index be740e1..5660374 100644 --- a/test/src/cte-test.c +++ b/test/src/cte-test.c @@ -63,7 +63,7 @@ int main(int argc, char **argv) */ 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); @@ -77,7 +77,7 @@ int main(int argc, char **argv) /**** 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); diff --git a/test/src/cursors-test.c b/test/src/cursors-test.c index 201595d..3fde5cb 100644 --- a/test/src/cursors-test.c +++ b/test/src/cursors-test.c @@ -138,7 +138,7 @@ int main(int argc, char **argv) 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); diff --git a/test/src/cvtnulldate-test.c b/test/src/cvtnulldate-test.c index 3e1e178..56c4af4 100644 --- a/test/src/cvtnulldate-test.c +++ b/test/src/cvtnulldate-test.c @@ -15,7 +15,7 @@ int main(int argc, char **argv) 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); diff --git a/test/src/dataatexecution-test.c b/test/src/dataatexecution-test.c index bd3ee13..36627b0 100644 --- a/test/src/dataatexecution-test.c +++ b/test/src/dataatexecution-test.c @@ -23,7 +23,7 @@ int main(int argc, char **argv) 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); diff --git a/test/src/deprecated-test.c b/test/src/deprecated-test.c index 2fa7e0c..dde8031 100644 --- a/test/src/deprecated-test.c +++ b/test/src/deprecated-test.c @@ -285,7 +285,7 @@ main(int argc, char **argv) /* 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); diff --git a/test/src/getresult-test.c b/test/src/getresult-test.c index 5967a5d..2eeef7d 100644 --- a/test/src/getresult-test.c +++ b/test/src/getresult-test.c @@ -18,7 +18,7 @@ int main(int argc, char **argv) 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); diff --git a/test/src/insertreturning-test.c b/test/src/insertreturning-test.c index e0f8ef5..ef839e7 100644 --- a/test/src/insertreturning-test.c +++ b/test/src/insertreturning-test.c @@ -18,7 +18,7 @@ int main(int argc, char **argv) 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); @@ -75,10 +75,10 @@ int main(int argc, char **argv) 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); } diff --git a/test/src/lfconversion-test.c b/test/src/lfconversion-test.c index 20f4b7f..12893be 100644 --- a/test/src/lfconversion-test.c +++ b/test/src/lfconversion-test.c @@ -23,7 +23,7 @@ int main(int argc, char **argv) /* 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); diff --git a/test/src/multistmt-test.c b/test/src/multistmt-test.c index cd55b66..f008050 100644 --- a/test/src/multistmt-test.c +++ b/test/src/multistmt-test.c @@ -34,7 +34,7 @@ int main(int argc, char **argv) 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); diff --git a/test/src/notice-test.c b/test/src/notice-test.c index 777c7a8..c4274f0 100644 --- a/test/src/notice-test.c +++ b/test/src/notice-test.c @@ -11,7 +11,7 @@ int main(int argc, char **argv) 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); @@ -73,7 +73,7 @@ int main(int argc, char **argv) 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); diff --git a/test/src/params-test.c b/test/src/params-test.c index eccd626..df76d55 100644 --- a/test/src/params-test.c +++ b/test/src/params-test.c @@ -19,7 +19,7 @@ int main(int argc, char **argv) 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); diff --git a/test/src/positioned-update-test.c b/test/src/positioned-update-test.c index 8b31233..c66123f 100644 --- a/test/src/positioned-update-test.c +++ b/test/src/positioned-update-test.c @@ -16,7 +16,7 @@ int main(int argc, char **argv) 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); diff --git a/test/src/prepare-test.c b/test/src/prepare-test.c index 0033caf..f4e05ff 100644 --- a/test/src/prepare-test.c +++ b/test/src/prepare-test.c @@ -18,7 +18,7 @@ int main(int argc, char **argv) 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); @@ -231,7 +231,7 @@ int main(int argc, char **argv) /* 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); diff --git a/test/src/quotes-test.c b/test/src/quotes-test.c index 6c3238c..0157d14 100644 --- a/test/src/quotes-test.c +++ b/test/src/quotes-test.c @@ -47,7 +47,7 @@ int main(int argc, char **argv) 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); diff --git a/test/src/select-test.c b/test/src/select-test.c index e4f0912..adeb80e 100644 --- a/test/src/select-test.c +++ b/test/src/select-test.c @@ -14,7 +14,7 @@ int main(int argc, char **argv) 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); diff --git a/test/src/stmthandles-test.c b/test/src/stmthandles-test.c index 3f8db14..15b378e 100644 --- a/test/src/stmthandles-test.c +++ b/test/src/stmthandles-test.c @@ -29,7 +29,7 @@ int main(int argc, char **argv) /* 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);