Appendix 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 [ } 89] . 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) 9.1.3 OleDB Errorcodes TS6420 136 Version:
1.2 Code (Hex) Code (Dez) Description 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) Database Type Errorcodereference Microsoft SQL Compact Database http://technet.microsoft.com/en-us/library/ms171788.aspx / TcDBServer OleDB Errorcodes.htm [} 136] _ _ Microsoft SQL Database TcDBServer OleDB Errorcodes.htm [} 136] _ _ Microsoft Access Database TcDBServer OleDB Errorcodes.htm [} 136] _ _ MySQL Database dev.mysql.com/doc/refman/5.0/en/error-handling.html Oracle Database http://www.ora-code.com DB2 Database https://www.ibm.com/docs/en/db2-for-zos/12?topic=codes-sql PostgreSQL Database http://www.postgresql.org/docs/current/static/errcodes- appendix.html Interbase/Firebird Database http://www.firebirdsql.org/file/documentation/ reference manuals/reference material/Firebird-2.1- _ _ ErrorCodes.pdf XML Database TcDBServer XML Errorcodes.htm [} 140] _ _ ASCII Database TcDBServer ASCII Errorcodes.htm [} 140] HRESULT Describtion 0x80040E00 Invalid accessor 0x80040E01 Creating another row would have exceeded the total number of active rows supported by the rowset 0x80040E02 Unable to write with a read-only accessor 0x80040E03 Given values violate the database schema 0x80040E04 Invalid row handle 0x80040E05 An object was open 0x80040E06 Invalid chapter 0x80040E07 A literal value in the command could not be converted to the correct type due to a reason other than data overflow 0x80040E08 Invalid binding info