Classes

Method SqlStatement:asString() Foundation

Returns the final SQL statement as it will be send to the SQL server

Syntax
METHOD :asString() -> cSqlStatement
Return

A character string of the final SQL statement.

Description

The method <asString()> returns the final SQL statement after the :build() or :bind() method operation took place. Execution of :asString() without having executed :build() or :bind() will result in a runtime error as there is no final SQL statement calculated.

oStmt := DacSqlStatement():fromChar("SELECT * FROM customers WHERE city==::SearchTerm") 

oStmt:SearchTerm := "Berlin" 

// Prints: SELECT * FROM customers WHERE city='Berlin' 
? oStmt:Build():asString() 

Feedback

If you see anything in the documentation that is not correct, does not match your experience with the particular feature or requires further clarification, please use this form to report a documentation issue.