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 ObjectsMaxRowsScopeData Type: integer(Optional.) Specifies a maximum number of array rows to populate (ifgreater than 0). Exceeding MaxRows causes an error (applies only toQY_ARRAY mode).Default: 0Data Type: Scope(Required.) Specifies the scope for evaluation of expressions in theColumns array Targets attribute.Default: Value of the current Scope attributeIt is always necessary to set the scope for an SQLSelect object or QueryObjectobject. Scope can be set as a parameter to the Open method or by setting theDataStream's Scope attribute directly. The following code sets the SQLSelectobject's Scope attribute to the scope of the current frame:ss.Scope = CurFrame.Scope;if ss.Scope != CurFrame.Scope then/* error */endif;Note: Because setting the scope causes compilation of expressions in theSQLSelect object, errors during compilation could prevent the scope fromsetting as expected. It is recommended, therefore, that you check forappropriate setting of the scope while you are developing the application andmake the necessary changes to your 4GL code.Rather than setting the scope by setting the Scope attribute, you can set itusing the Open method. The following code opens the SWLSelect object incache mode, with CheckCols set to TRUE, and specifies the current frame asthe scope:status = ss.Open(querymodecheckcolscope);= QY_CACHE,= TRUE,= CurFrame.ScopeWorking with a Database 171

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

Saved successfully!

Ooh no, something went wrong!