Get statement

Command group Flag affected Reversible Execute on client Platform(s)
SQL Object Commands NO NO NO All


Get statement field-name


This command loads the contents of the SQL statement buffer into a specified field or variable. The field-name parameter can be any Omnis character field or variable. The buffer holds all SQL statements and text entered since the last Begin statement command which have not yet been executed. The square brackets and SQL functions will have been evaluated but the values of indirect @[] square bracket notation will not be available.


; Show the sql to the user before creating the
; table MY_TABLE
Calculate lHostname as con(sys(115),'mydatafile.df1')
Do iSessObj.$logon(lHostname,'','','MYSESSION')
Do iSessObj.$newstatement('MyStatement') Returns lStatObj
Do lRow.$definefromsqlclass('sMySchemaClass')
Do iSessObj.$createnames(lRow) Returns lCreateNames
Begin statement
Sta: Create Table MY_TABLE ([lCreateNames])
End statement
Get statement lStatment
Yes/No message {Execute [lStatment]}
If flag true
  Do lStatObj.$execdirect()
End If