SQLCode has three values. From the help:
0 | Success. |
100 | Fetched row not found. |
-1 | Error; the statement failed. Use SQLErrText or SQLDBCode to obtain the detail. |
The actual database error code is SQLDBCode and the error message is SQLErrText.
As was mentioned before, the bitness of your app must match the database interface you are using. The bitness of the database server doesn't matter.