Internal Errorcodes of the TwinCAT Database Server
Code (Hex) | Code (Dez) | Description |
---|---|---|
0x0001 + ADS-FehlerCode | 65537 - 131071 | ADS Errorcode of the declared ADS-Device |
0x00020001 | 131073 | Microsoft SQL Compact Database (Errorcode) |
0x00040001 | 262145 | Microsoft SQL Database (Errorcode) |
0x00080001 | 524289 | Microsoft Access Database (Errorcode) |
0x00100001 | 1048577 | MySQL Database (Errorcode) |
0x00200001 | 2097153 | Oracle Database (Errorcode) |
0x00400001 | 4194305 | DB2 Database (Errorcode) |
0x00800001 | 8388609 | PostgreSQL Database (Errorcode) |
0x01000001 | 16777217 | Interbase/Firebird Database (Errorcode) |
0x02000001 | 33554433 | TwinCAT Database Server Errorcode |
0x04000001 | 67108865 | XML Database (Errorcode) |
0x08000001 | 134217729 | ASCII Database (Errorcode) |
If an error occurs at executing an SQL statement, one of the declared errorcodes from the top of this site will be displayed at the output "nErrID". The specified errorcode of the database will be displayed at the "sSQLState" Output of the function block. The output "sSQLState" has the data type ST_DBSQLError. The "sSQLState" can supply an errorcode for each database type.
At the following link you can find a list of SQLStates und their discribtion: http://msdn.microsoft.com/en-us/library/ms714687(VS.85).aspx (SQLStates)
Database type | Error code reference |
---|---|
Microsoft SQL Compact database | http://technet.microsoft.com/en-us/library/ms171788.aspx / OleDB_Errorcodes.htm |
Microsoft SQL database | OleDB_Errorcodes.htm |
Microsoft Access database | OleDB_Errorcodes.htm |
MySQL database | https://dev.mysql.com/doc/mysql-errors/8.0/en/client-error-reference.html |
Oracle database | https://docs.oracle.com/cd/E11882_01/server.112/e17766/toc.htm |
DB2 database | https://www.ibm.com/docs/en/db2-for-zos/12?topic=diagnostics-sqlstates-odbc-error-reporting |
PostgreSQL database | http://www.postgresql.org/docs/current/static/errcodes-appendix.html |
Interbase/Firebird database | |
XML database | TcDBServer_XML_Errorcodes.htm |
ASCII database | TcDBServer_ASCII_Errorcodes.htm |