Thread: Error codes from ODBC driver

Error codes from ODBC driver

From
dirk.jacobs@tuple.be
Date:

version 7.01.00.09

Hi there,

I want to detect if a table already exists or an index already exists but the driver always returns with SQLState S1000 which is a general error code.

The correct SQLstates are :

#define SQLSTATE_GENERAL_ERROR "S1000"


#define SQLSTATE_TABLE_EXISTS "S0001"
#define SQLSTATE_TABLE_NOT_FOUND "S0002"
#define SQLSTATE_INDEX_EXISTS "S0011"
#define SQLSTATE_INDEX_NOT_FOUND "S0012"

Any suggestions ?

-Dirk Jacobs