PgDAC
Used to get the end position of the statement in a script.
TDAStatement
property EndPos: integer;
Use the EndPos property to get the end position of the statement (the position of the last character in the statement) in a script.