Support for SQLMoreResults() (odbc-sql-more-results)
This commit is contained in:
parent
78b653e815
commit
2e4ac7c244
|
@ -1617,9 +1617,54 @@ s48_value odbc_sql_bulk_operations(s48_value stmt_handle, s48_value operation)
|
|||
}
|
||||
}
|
||||
|
||||
/* Determines whether there are more result sets available and, if so,
|
||||
initializes processing for the next result set */
|
||||
s48_value odbc_sql_more_results(s48_value stmt_handle)
|
||||
{
|
||||
SQLHSTMT sh;
|
||||
SQLRETURN retval;
|
||||
|
||||
ODBC_DEBUG_PRINTF("odbc_sql_more_results\n");
|
||||
|
||||
sh = (SQLHSTMT) s48_extract_integer(stmt_handle);
|
||||
|
||||
retval = SQLMoreResults(sh);
|
||||
|
||||
switch (retval)
|
||||
{
|
||||
case SQL_SUCCESS: case SQL_SUCCESS_WITH_INFO:
|
||||
{
|
||||
return S48_TRUE;
|
||||
}
|
||||
case SQL_NO_DATA:
|
||||
{
|
||||
return SQL_NO_DATA;
|
||||
}
|
||||
case SQL_STILL_EXECUTING:
|
||||
{
|
||||
ODBC_RAISE_EXCEPTION("SQLMoreResults returned SQL_STILL_EXECUTING. Not implemented");
|
||||
break;
|
||||
}
|
||||
case SQL_ERROR:
|
||||
{
|
||||
ODBC_RAISE_EXCEPTION("SQLMoreResults returned SQL_ERROR");
|
||||
break;
|
||||
}
|
||||
case SQL_INVALID_HANDLE:
|
||||
{
|
||||
ODBC_RAISE_EXCEPTION("SQLMoreResults got invalid handle");
|
||||
break;
|
||||
}
|
||||
default:
|
||||
{
|
||||
ODBC_RAISE_EXCEPTION("SQLMoreResults returned unknown error code");
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
s48_value odbc_sql_fetch(s48_value stmt_handle)
|
||||
{
|
||||
|
||||
SQLHSTMT sh;
|
||||
SQLRETURN retval;
|
||||
|
||||
|
@ -2845,6 +2890,7 @@ void s48_init_odbc(void)
|
|||
S48_EXPORT_FUNCTION(odbc_sql_get_data);
|
||||
S48_EXPORT_FUNCTION(odbc_sql_set_pos);
|
||||
S48_EXPORT_FUNCTION(odbc_sql_bulk_operations);
|
||||
S48_EXPORT_FUNCTION(odbc_sql_more_results);
|
||||
S48_EXPORT_FUNCTION(odbc_sql_fetch);
|
||||
S48_EXPORT_FUNCTION(odbc_sql_num_result_cols);
|
||||
S48_EXPORT_FUNCTION(odbc_sql_describe_col);
|
||||
|
|
|
@ -247,6 +247,9 @@ s48_value odbc_sql_set_pos(s48_value stmt_handle, s48_value row_number,
|
|||
update, delete, and fetch by bookmark. */
|
||||
s48_value odbc_sql_bulk_operations(s48_value stmt_handle, s48_value operation);
|
||||
|
||||
/* Determines whether there are more result sets available and, if so,
|
||||
initializes processing for the next result set */
|
||||
s48_value odbc_sql_more_results(s48_value stmt_handle);
|
||||
|
||||
void check_sql_get_data_result(SQLRETURN retval, SQLHSTMT stmt_handle);
|
||||
|
||||
|
|
|
@ -695,6 +695,14 @@
|
|||
(stmt-handle operation)
|
||||
"odbc_sql_bulk_operations")
|
||||
|
||||
(define (odbc-sql-more-results stmt-handle)
|
||||
(check-arg statement-handle? stmt-handle odbc-sql-more-results)
|
||||
(odbc-sql-more-results-internal (statement-handle-handle stmt-handle)))
|
||||
|
||||
(import-lambda-definition odbc-sql-more-results-internal
|
||||
(stmt-handle)
|
||||
"odbc_sql_more_results")
|
||||
|
||||
(define (odbc-sql-fetch stmt-handle)
|
||||
(check-arg statement-handle-handle stmt-handle odbc-sql-fetch)
|
||||
(odbc-sql-fetch-internal (statement-handle-handle stmt-handle)))
|
||||
|
|
Loading…
Reference in New Issue