13.07.2015 Views

Using SQL Adapters with Ensemble - InterSystems Documentation

Using SQL Adapters with Ensemble - InterSystems Documentation

Using SQL Adapters with Ensemble - InterSystems Documentation

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

<strong>Using</strong> SnapshotsSetColTypesSets the sizes of the columns (the width in number of characters), in the order given by thearguments.method SetColTypes(pColType...) returns %StatusSets the types of the columns, in the order given by the arguments.Note:Remember that the <strong>SQL</strong> type names vary between different database vendors. Usethe type names that are appropriate for the database <strong>with</strong> which you are working.The SetColTypes method does not perform any checking of your type names.7.2 Getting Basic Information about theSnapshotThe following properties of the snapshot provide basic information:• The %CurrentRow property is an integer that indicates the current row.• The AtEnd property is true if the current row is the last row; otherwise it is false.• The ColCount properties indicates the number of columns in the snapshot.• The RowCount properties indicates the number of columns in the snapshot. This property countsonly the rows that do not start <strong>with</strong> the comment string, if any. To create a snapshot that includescomments, use the CreateFromFile and related methods, and specify a value for the pLineCommentargument. A row is counted if it begins <strong>with</strong>out the comment string but includes the commentstring in a later position.7.3 Navigating the SnapshotA snapshot consists of rows of data. You can use the following methods to navigate through the rows:Nextmethod Next() returns %IntegerAdvances the cursor to the next row. Returns 0 if the cursor is at the end of the snapshot.58 <strong>Using</strong> <strong>SQL</strong> <strong>Adapters</strong> <strong>with</strong> <strong>Ensemble</strong>

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

Saved successfully!

Ooh no, something went wrong!