If the data for the DataWindow object does not come from a database, specify External as the data source. You then specify the data columns and their types so that PocketBuilder can build the appropriate DataWindow object to hold the data. These columns make up the result set. PocketBuilder places the columns you specified in the result set in the DataWindow object.
To define the data using External:
Click External in the Choose Data Source dialog box in the wizard and click Next.
The Define Result Set dialog box displays for you to specify the first column in the result set.
Enter the name and type of the column.
Available datatypes are listed in the drop-down list.
Click Add to enter the name and type of any additional columns you want in the result set.
Click Next when you have added all the columns you want.
In a script, you need to tell PocketBuilder how to get data into the DataWindow object in your application. Typically, you import data during execution using a function (such as ImportFile and ImportString) or do some data manipulation and use the SetItem function to populate the DataWindow.
For more about these functions, see the DataWindow Reference in the online Help.
You can also import data values from an external file into the DataWindow object or report.
To import the data values from an external file:
Make sure the Preview view of the DataWindow object is selected.
Select Rows>Import from the menu bar.
The Select Import File dialog box displays.
Select the type of files to list from the List Files of Type drop-down list (either TXT or DBF files).
Select or type the name of the file you want to import and click OK.
Copyright © 2004. Sybase Inc. All rights reserved. |