Delphi / Object Pascal · Database exception

BDE Error 13059 ($3303) - General SQL Error

What does BDE Error 13059 ($3303) - General SQL Error mean in Delphi / Object Pascal?

The BDE's generic 'General SQL error', raised when a database system accessed via SQL Links (Oracle, Sybase, InterBase, etc.) reports an error the BDE can't map to a more specific code of its own. The real cause is almost always in the second TDBError entry, carrying the backend's own native error code and message.

BDE Error 13059 ($3303) - General SQL ErrorDelphi (VCL) · Delphi (BDE)

Condition

The BDE's generic 'General SQL error', raised when a database system accessed via SQL Links (Oracle, Sybase, InterBase, etc.) reports an error the BDE can't map to a more specific code of its own. The real cause is almost always in the second TDBError entry, carrying the backend's own native error code and message.

Fix

Don't stop at the generic BDE message - inspect the second TDBError in the exception's Errors collection for the backend's actual native error code and text, which identifies the real problem such as a constraint violation or syntax error.

Related database exception