}
if (stmt->parameters[ipar].EXEC_buffer) {
- free(stmt->parameters[ipar].EXEC_buffer);
+ if (stmt->parameters[ipar].SQLType != SQL_LONGVARBINARY)
+ free(stmt->parameters[ipar].EXEC_buffer);
stmt->parameters[ipar].EXEC_buffer = NULL;
}
}
if (self->parameters[i].EXEC_buffer) {
- free(self->parameters[i].EXEC_buffer);
+ if (self->parameters[i].SQLType != SQL_LONGVARBINARY)
+ free(self->parameters[i].EXEC_buffer);
self->parameters[i].EXEC_buffer = NULL;
}
}
*/
}
else {
- self->errornumber = STMT_BAD_ERROR;
+ self->errornumber = STMT_EXEC_ERROR;
self->errormsg = "Error while executing the query";
}