Обсуждение: Using an SRF with VB6

Поиск
Список
Период
Сортировка

Using an SRF with VB6

От
"Keith Worthington"
Дата:
Hi All,

I have written a set returning function using plpgsql.  It works fine on the
database side
DB=# SELECT * FROM interface.func_item_sales('TIE24');
 order |         company_name         | actvt_date | qty
-------+------------------------------+------------+----
 12170 | W.E.I. West                  | 2004-11-30 | 16
 12354 | Handling Systems of Maine    | 2005-01-03 | 12
 12357 | Bemis Company Inc.           | 2005-01-07 | 20
 12448 | Crown Lift Trucks - LaGrange | 2005-01-11 | 32
 12487 | C & S Equipment, Inc.        | 2005-01-11 |  4
 12557 | Scholtz Equipment            | 2005-01-18 |  4

My question ( and feel free to point me to a more appropriate list ) is how
would this be accessed from a user interface written in VB6?  We have had
success in accessing views but seem to be hitting a snag when using the
function.  What are the column names?  How are they determined?  From the
type?  Does the output need to be aliased in order to access the data?  i.e.

SELECT * FROM interface.func_item_sales('item') AS returned_data_set;

Your guidance is appreciated.

Kind Regards,
Keith