Method SqlStatement:fromChar() Foundation

Initializes a SQLStatement object from a character string.

METHOD :fromChar( <cStatement> ) -> oSqlStatement
The parameter <cStatement> must be a valid SQL statement in the native syntax of the connected dbms. Named parameters are prefixed with ::, in case the SQL syntax requires :: use backslash as an escape character \::.

This method returns an instance object used for statement handling and execution.


To make handling of parameters passed to the SQL system and reuse of statement definitons more easier the SqlStatement class supports a named parameter syntax. To use that feature simple add a <::SymbolName> to your string. The SQLstatement class automatically then emulates a Member-Var with the name "SymbolName". If you assign a value to the member this value is inserted at the statement with the :build() operation. A sample is shown at the :asString() method explanantion.

// Create a statement from character string 
oCreateDbStmt := DacSqlStatement():fromChar("CREATE DATABASE crm_system") 

// build and execute the statement 


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.