PowerBuilder · Database exception
What does DBError Event Code -1 (Cannot Connect to Database) mean in PowerBuilder?
PowerBuilder passes -1 as the code argument of the DBError event when a connection attempt to the database cannot be established and the underlying driver did not supply a native DBMS error code to pass through. This is one of three fixed fallback values PowerBuilder uses in DBError when no vendor-specific code is available.
PowerBuilder passes -1 as the code argument of the DBError event when a connection attempt to the database cannot be established and the underlying driver did not supply a native DBMS error code to pass through. This is one of three fixed fallback values PowerBuilder uses in DBError when no vendor-specific code is available.
In the Transaction object's or DataWindow's DBError event, branch on code = -1 to run connection-specific diagnostics (server reachability, DBParm string, credentials) instead of generic SQL troubleshooting, since no DBMS code will be present to inspect. Log sqlerrortext for whatever driver-level detail is available.