Statements that can use persistent binding

Most Embedded SQL statements can use persistent binding. However, Table 9-1 and Table 9-2 list Embedded SQL commands that cannot use persistent binding. All other Embedded SQL commands—including Transact-SQL commands—can use persistent binding for some or all host variables.

Whether a statement’s bindings persist and how long they persist depends on the type of statement—particularly, on whether the statement uses a cursor.

Table 9-1: Embedded SQL commands that cannot use persistent binding

allocate descriptor

begin transaction

close

commit

connect

deallocate cursor

deallocate descriptor

deallocate prepare

describe input

describe output

disconnect

end transaction

execute

execute immediate

get descriptor

get diagnostics

open using descriptor

prepare

prepare transaction

rollback

set descriptor

set connection

set transaction diagnostics

Table 9-2: Types of Embedded SQL commands that cannot use persistent binding

Commands that send text or image data to Adaptive Server with the -y option

Dynamic SQL commands that use a SQL descriptor or SQLDA for input to Adaptive Server