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

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

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

7<strong>Using</strong> SnapshotsThe EnsLib.<strong>SQL</strong>.Snapshot class represents a static object that you create and populate in various ways.The class provides methods for examining the data; more methods are available for this object thanfor the result set.This chapter describes how to use the EnsLib.<strong>SQL</strong>.Shapshot class. It discusses the following:• How to create a snapshot• How to get basic information about the snapshot• How to navigate the snapshot, row by row• How to get information about the current row of the snapshot• How to reset a snapshot7.1 Creating a SnapshotWhen you use the <strong>SQL</strong> inbound adapter, by default, you automatically receive snapshot objects <strong>with</strong>inyour business service. For each row in your query, the adapter creates a snapshot object and sends itas an argument when it calls the ProcessInput method of the business service. As noted previously,by default, this snapshot contains only a single row.You can create a snapshot and populate it in other ways. Some of these techniques were discussed inprevious chapters, but some are new to this chapter.<strong>Using</strong> <strong>SQL</strong> <strong>Adapters</strong> <strong>with</strong> <strong>Ensemble</strong> 53

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

Saved successfully!

Ooh no, something went wrong!