10.07.2015 Views

Programming Guide - Actian

Programming Guide - Actian

Programming Guide - Actian

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

How You Can Access a Database with DataStream ObjectsWhen you assign each column participating in the query to a row in theColumns attribute, you assign it to at least one target in the Targets array(which is an attribute of the Columns array attribute). Specifying more thanone target for a column lets you assign it to more than one field or variable inthe frame.For example, you can assign a column to different targets if you want to:• Put a column's value into both a simple field and a table field• Store a column's original value (for comparison to changes made later bythe user)Because the Targets attribute is an array of type QueryParm, it contains thefollowing attributes, two of which are required for using an SQLSelect object.The following target attributes are required for SQLSelect objects:ExpressionContains the name of the target field or variable, such as “field1” or“tbl[i].col1”IsDBHandleFieldSet to TRUE if the column's value is to be retrieved as a DBHandle and thetarget expression evaluates to a bitmap object or string object to beloaded using this DBHandleIsSelectTargetSet to TRUE if the column is used as a target for a select statement;defaults to FALSEBecause the IsDBHandleField attribute defaults to FALSE, specifying it isrequired only for columns whose values are retrieved as a DBHandle. Settingthe IsSelectTarget attribute is required even though the select clause includesevery column for selection.The index of the Columns array is incremented for each column selected fromthe database. The index of the Targets array is incremented only if the columnis to be sent to more than one target field or variable. Each column must besent to at least one target.168 <strong>Programming</strong> <strong>Guide</strong>

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!