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