Progress
DataServer
for ODBC Guide
Retrieving Data-source Results
Progress provides two techniques for accessing results returned from a data source by the stored procedure. You can:
The following 4GL procedure reads the database results from the stored procedure into the proc–text–buffer supplied by Progress:
The Progress-defined buffer, proc–text–buffer, has one character field named proc–text. The buffer accepts the returned database results, converts them to CHARACTER data type, and concatenates them into one string. The advantage of using the proc–text–buffer is that you do not have to worry about what kind of data the procedure returns. The buffer accepts any type of data, in any order. The disadvantage is that it is much more difficult to manipulate the data after you receive it. To act on anything but CHARACTER data, you must extract the data from the buffer and convert it to its original data type before you can use it.
Another benefit of the proc–text–buffer is that it holds the results from all of the SQL statements included in a stored procedure. However, a buffer that you create can hold the results of only one SQL statement.
This is the partial syntax for the DEFINE BUFFER statement that you use to create a buffer with the same characteristics of the proc–text–buffer:
For a complete description, see the DEFINE BUFFER entry in the
Progress Language Reference.
Copyright © 2004 Progress Software Corporation www.progress.com Voice: (781) 280-4000 Fax: (781) 280-4095 |