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 ObjectsHow You Can Use Query ObjectsTo allow users to change, delete, or add data to a database, use a query objectrather than an SQLSelect object. Unlike the process for creating an SQLSelectobject, which requires you to provide the SQL select statement and the targetinformation, you cannot create the select statement for a query object(QueryObject.Query.Value is read-only).Creating a query object requires you to specify data to be retrieved andmanipulated. The query object builds the select statement for you.Creating a query object requires setting attributes and invoking methods of thesame system classes involved in creating an SQLSelect object. The systemclasses used in creating both SQLSelect and QueryObject objects are:• DataStream• QueryCol• QueryParm• SQLSelectIn addition, creating a query object involves the following two system classes:• QueryObject• QueryTableFor a description of these system classes, see the Language Reference <strong>Guide</strong>online help.Moreover, setting the Targets attribute for a query object is somewhat morecomplicated than setting it for an SQLSelect object because there are morerelevant attributes of the Targets array to be set.The Targets attribute, which is an array of type QueryParm, contains thefollowing attributes, all of which are required for creating a query object:ExpressionContains the name of the target field or variable, such as “field1” or“tbl[i].col1”Default: NoneIsFileHandleFieldSet to TRUE if the column's value is to be retrieved as a FileHandle and thetarget expression evaluates to a bitmap object or string object to beloaded using the FileHandleDefault: FALSEWorking with a Database 177

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

Saved successfully!

Ooh no, something went wrong!