mirror of
https://github.com/mdbtools/mdbtools.git
synced 2025-04-05 20:31:00 +08:00
Fixed odbc.c compiler warnings
Return SQL_ERROR when wanted column is lost
This commit is contained in:
parent
212337cfaa
commit
5e092ba331
@ -870,6 +870,9 @@ SQLRETURN SQL_API SQLColAttributes(
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (i==table->num_cols) {
|
||||
return SQL_ERROR;
|
||||
}
|
||||
|
||||
// fprintf(stderr,"fDescType = %d\n", fDescType);
|
||||
switch(fDescType) {
|
||||
@ -1483,6 +1486,8 @@ SQLRETURN SQL_API SQLGetData(
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (i==table->num_cols)
|
||||
return SQL_ERROR;
|
||||
|
||||
if (icol!=stmt->icol) {
|
||||
stmt->icol=icol;
|
||||
|
Loading…
Reference in New Issue
Block a user