End statement

Command groupFlag affectedReversibleExecute on clientPlatform(s)
SQL Object CommandsNONONOAll

Syntax

End statement

Description

This command marks the end of a block of Sta: commands that build the SQL buffer for the current method stack. The Begin statement command defines the start of the block.

Example

# Open a multi-threaded omnis sql connection to

# the datafile mydatafile and create a statement to

# select rows from the table Customers

Calculate
 
lHostname
 as 
con
(
sys
(115),
'mydatafile.df1'
)

Do
 
iSessObj
.
$logon
(
lHostname
,
''
,
''
,
'MYSESSION'
)

Do
 
iSessObj
.
$newstatement
(
'MyStatement'
)
 
Returns 
lStatObj

 
Begin statement
Sta:
Select * From Customers

Sta:
Where Cust_ID > 100

End statement

Do
 
lStatObj
.
$execdirect
()

 
Do
 
lStatObj
.
$fetch
(
lMyList
,
kFetchAll
)