pdo_firebird_db_handle *H = S->H;
if (!stmt->executed) {
- stmt->error_code = PDO_ERR_CANT_MAP;
+ strcpy(stmt->error_code, "HY000");
H->last_app_error = "Cannot fetch from a closed cursor";
} else if (!S->exhausted) {
}
if (!sqlda || param->paramno >= sqlda->sqld) {
- stmt->error_code = PDO_ERR_NOT_FOUND;
+ strcpy(stmt->error_code, "HY093");
S->H->last_app_error = "Invalid parameter index";
return 0;
}
}
}
if (i >= sqlda->sqld) {
- stmt->error_code = PDO_ERR_NOT_FOUND;
+ strcpy(stmt->error_code, "HY093");
S->H->last_app_error = "Invalid parameter name";
return 0;
}
switch (var->sqltype & ~1) {
case SQL_ARRAY:
- stmt->error_code = PDO_ERR_NOT_IMPLEMENTED;
+ strcpy(stmt->error_code, "HY000");
S->H->last_app_error = "Cannot bind to array field";
return 0;
case IS_NULL:
/* complain if this field doesn't allow NULL values */
if (~var->sqltype & 1) {
- stmt->error_code = PDO_ERR_CONSTRAINT;
+ strcpy(stmt->error_code, "HY105");
S->H->last_app_error = "Parameter requires non-null value";
return 0;
}
*var->sqlind = -1;
break;
default:
- stmt->error_code = PDO_ERR_NOT_IMPLEMENTED;
+ strcpy(stmt->error_code, "HY105");
S->H->last_app_error = "Binding arrays/objects is not supported";
return 0;
}