Home How To Online Documentation Support Download Order

 

 

 

SACommand
SAConnection
SAException
SAField
SAParam

SAString
SADateTime
SANumeric
SAInterval

Enums and Typedefs

  

Usage

Class Members

Examples

SAException::ErrPos

int ErrPos() const;

Gets an error position in SQL statement.

Return values

An integer value representing error position.

Not all DBMS servers allow to get error position. See Server specific notes to get detailed information about returned value.

Remarks

If a command object's associated SQL statement contains any syntax errors, an exception will be thrown when you try to compile. ErrPos method returns the error position within the command string.

Server specific notes

DBMS server

ErrPos method returned value

Oracle

ErrPos returns parse error offset.

SQL Server

ErrPos returns the number of line within SQL statement where error occurred.

Sybase

ErrPos returns the number of line within SQL statement where error occurred.

DB2

ErrPos returns -1. DB2 does not support this function.

Informix

ErrPos returns -1. Informix does not support this function.

InterBase

ErrPos returns -1. InterBase does not support this function.

SQLBase

ErrPos returns character position of the syntax error within an SQL statement. The first character is position 0.

MySQL

ErrPos returns -1. MySQL does not support this function.

PostgreSQL

ErrPos returns -1. PostgreSQL does not support this function.

ODBC

ErrPos returns -1. ODBC does not support this function.

SQLite

ErrPos returns -1. SQLite does not support this function.

See also

ErrClass, ErrMessage, ErrNativeCode

Problems and Questions

If you haven't found the answer to your questions or have some problems on using the Library, please, send e-mail to howto@sqlapi.com.