Subject | Re: [IBO] Stored Procedures & Grids? |
---|---|
Author | Lucas Franzen |
Post date | 2004-07-24T14:05:51Z |
Myles,
Myles Wakeham schrieb:
If you use selectable procedures then they are handled jsut like any
other SELECT (be at tables or views) thus you have to use the
appropriate component to retrieve the records.
Just use a TIB_Query, enter the appropriate SQL (ie "SELECT * from
STORED_PROC (:PARAM1, :PARAM2, etc.)") rie a TIB_DataSource tot he Query
and a TIB_Grid to the TIB_Datasource and off you go.
(If you use TIBOQueries, then you have to use the standard TDatasource
and TDBGrid).
Never use a TIB_StroedProc compoentn for this, this is only for
EXECUTABLE proceduresa (which return just a single set of params/fields)
Luc.
Myles Wakeham schrieb:
>None.
> Now I tried to do this with a stored procedure, as all of my interfacing
> with the database is done through SPs and I can't seem to get the grid tool
> to populate with the results of a stored procedure that returns just like a
> SELECT statement (ie. Many rows returned). I was able to get it to
> automatically populate for a single record per form page (ie. Fields showing
> vertically down the form), but I can't find the grid tool that I should use
> to show a grid style list of rows retrieved. What's the secret?
If you use selectable procedures then they are handled jsut like any
other SELECT (be at tables or views) thus you have to use the
appropriate component to retrieve the records.
Just use a TIB_Query, enter the appropriate SQL (ie "SELECT * from
STORED_PROC (:PARAM1, :PARAM2, etc.)") rie a TIB_DataSource tot he Query
and a TIB_Grid to the TIB_Datasource and off you go.
(If you use TIBOQueries, then you have to use the standard TDatasource
and TDBGrid).
Never use a TIB_StroedProc compoentn for this, this is only for
EXECUTABLE proceduresa (which return just a single set of params/fields)
Luc.