ADO RecordSet Object Extension Template

Top  Previous  Next

The ADO template extension ADORecordsetObject will generate the necessary class and code to create an ADO recordset object.

The following prompts are provided:

 

Recordset Object Name and Class

These prompts simply hold the default object and class names defined by the ADO Recordset Object. If you have overwritten these values in the source files, you can enter the different names here.

 

Generate a TableMapper object

Check this box to instruct the templates to generate a TableMapper object. This object is used to map the ADO column names accessed to the buffer elements defined in your application.

Mapping is normally automatic for the ADO Browse and Process templates, but if you need to create a Recordset object for a simple task (i.e., export data to a XML file), a mapper would not be needed.

 

Generate buffer as a

 

You must specify if the Recordset columns value will be stored in a corresponding GROUP or QUEUE structure. Also, in order to have the template generate this structure for you, you MUST click on the Check Query button located on the Command Type tab. This is necessary for the template because the underlying DLL support will return the metadata information related to the query that the resultset will perform at runtime.

 

Check the Generate loop to fill the queue after Open call check box if you need to populate the contents of the recordset into the QUEUE.

 

In order to actually execute this command, you will have to include the ADORecordsetOpen code template in an appropriate embed point near the beginning of the procedure.

 

Connection Settings

In most cases you should use the default connection provided by the Global support template. However, there may be times when you need the ADORecordset Object to reference a different server or database.

Check this box to use an existing connection object, and select a valid name from the drop list.

 

In the Command Type tab, depending of the type of command that is selected, there is a button used to get a list of available stored procedures (adCmdStoredProc). The command type selected can also execute a query to see if the query is valid (adCmdText).

The types of commands here are standard ADO commands that are found in any standard ADO reference guide. Consult your auxiliary documentation for more information.