Agents Tutorial

Read a table from an Access database using the OleDb agent, and write to a Unicode SDF file using the Desktop agent.  This tutorial uses the C:\data\ as a working folder.

 

Preparation

This tutorial begins as the Crash Course tutorial did, using Nwind.mdb and working in C:\Data\.

 

OleDb Agent

Pick File/Open Data from the menu, and select Files of type: Access(*.mdb). Navigate to the directory containing Nwind.mdb, select the file and press Open.

After Nwind.mdb is chosen, select Customers from the Choose Table dialog.

Exploration.  Pick the small [...] button in the upper left corner of the grid. When an agent is loaded, this button brings up the File/Data Link dialog. Pick [Cancel] to close the OleDb Data Link dialog.

Choose Edit/Properties to being up the grid properties dialog. Choose the [Agent] button. Choose Desktop - Windows Desktop. Press [OK] out of both dialogs.

Pick File/Save. Enter C:\Data\CustomersDesktop.dfg for the file name and press [Save] to close the file dialog.

Pick File/Close to close the file.

 

Desktop Agent

Pick File/Open and select C:\Data\CustomerDesktop.dfg. Pick the Results tab of the History window and notice the message:

Agent link information removed (CiExtraAgentOleDb has been changed to CiExtraAgentDesktop).

Pick the small [...] button in the upper left corner of the grid.

 

Into the Desktop Data Link dialog enter C:\Data\Customers.txt as the File Name. Check [x] Unicode.  Pick [2028] - Line Separator.   Check [x] Fields . Choose Delimited with header.

Pick File/Write Data.  Use Wordpad (notepad does not recognize the Unicode line separator) to check the contents of C:\Data\Customers.txt.

 

Experiment. Pick File/Data Link and choose [0D][0A] - Cr+Lf for End of Line. Pick File/Data Write

Notice the Error message Row(16) contains an end of Line character.

Pick Edit/Goto/Cell. Type 5 as the column and 16 as the row. Press [OK].  Pick Edit/Cell/Edit Memo. Notice that the cell is multi-line, containing a Cr+Lf sequence, thus the default End of Line character cannot be used.

 

Complete. Additional tutorials.

 


Data Flask Copyright © 2006 Interscape Corporation