PowerBuilder · Database exception
What does DBError Event Code -2 (Blob Write Failed) mean in PowerBuilder?
PowerBuilder passes -2 as the code argument of the DBError event specifically when writing a BLOB value to the database fails, again in the absence of a native DBMS error code from the driver. It signals the failure happened during blob transfer rather than during normal statement execution.
PowerBuilder passes -2 as the code argument of the DBError event specifically when writing a BLOB value to the database fails, again in the absence of a native DBMS error code from the driver. It signals the failure happened during blob transfer rather than during normal statement execution.
Handle code = -2 by checking the size and datatype compatibility of the blob column and the transfer buffer, and confirm the driver's blob/LOB handling DBParm settings, since this path bypasses the usual SQLDBCode detail. Retry with a smaller chunked write if the driver enforces a maximum blob size per call.