Skip to content

Commit 557de2a

Browse files
author
Hiroshi Inoue
committed
Let psqlodbc30 be compilable without /D DRIVER_CURSOR_IMPLEMENT.
1 parent eb953c3 commit 557de2a

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

src/interfaces/odbc/odbcapi30.c

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -526,6 +526,12 @@ SQLBulkOperations(HSTMT hstmt, SQLSMALLINT operation)
526526
{
527527
static char *func = "SQLBulkOperations";
528528
StatementClass *stmt = (StatementClass *) hstmt;
529+
#ifndef DRIVER_CURSOR_IMPLEMENT
530+
stmt->errornumber = STMT_NOT_IMPLEMENTED_ERROR;
531+
stmt->errormsg = "driver must be compiled with the DRIVER_CURSOR_IMPLEMENT option";
532+
SC_log_error(func, "", stmt);
533+
return SQL_ERROR;
534+
#else
529535
ARDFields *opts = SC_get_ARD(stmt);
530536
RETCODE ret;
531537
UInt4 offset, bind_size = opts->bind_size, *bmark;
@@ -586,4 +592,5 @@ SQL_AUTOCOMMIT_OFF);
586592
break;
587593
}
588594
return ret;
595+
#endif /* DRIVER_CURSOR_IMPLEMENT */
589596
}

0 commit comments

Comments
 (0)