Subject | How getting Results from StoredProcedure |
---|---|
Author | Gerhard J. Schober @ DEVCON.LI |
Post date | 2002-01-18T13:49:39Z |
Hi,
I have a very simple question:
How can I get some results from a StoredProcedure ?
Sample Code:
CREATE PROCEDURE INV_IN
(INV_IN VARCHAR(12))
RETURNS
(RES_CODE VARCHAR(1))
AS
declare variable INVID Varchar(12);
declare variable INVTYPE Varchar(30);
declare variable INVPARTS Integer;
declare variable OBJNUM double Precision;
BEGIN
INVID = "";
select INV_ID, INV_TYPE, INV_PARTS, OBJNR from INVENTORY
where INV_ID = :INV_IN
into :INVID, :INVTYPE, :INVPARTS, :OBJNUM;
if (INVID = "") then
begin
RES_CODE = "0";
end
else
begin
RES_CODE = "1";
end
END;
The RES_CODE will return (testet), but
how can I get this RES-CODE value in my application?
Thanks
Gerhard J. Schober
-----------------------------------------------------------------------
DevCon Engineering
P.O.Box 179
9490 Vaduz
Principality of Liechtenstein
-----------------------------------------------------------------------
EMail: gjschober@...
Web1: www.devcon.li
Web2: www.onealarm.net
-----------------------------------------------------------------------
LAT 47° 09.8334' N
LON 009° 30.6067' E
ELEV 463.5 m
-----------------------------------------------------------------------
4C6B 5D10 84C0 48FD CE80 9CA1 0C74 34EA FA6C 6965
-----------------------------------------------------------------------
Privileged/Confidential Information may be contained in this message.
If you are not the addressee indicated in this message (or responsible
for delivery of the message to such person), you may not copy or
deliver this message to anyone. In such case, you should destroy this
message and kindly notify the sender by reply email. Please advise
immediately if you or your employer does not consent to Internet email
for messages of this kind. Opinions, conclusions and other information
in this message that do not relate to the official business of my firm
shall be understood as neither given nor endorsed by it.
-----------------------------------------------------------------------
I have a very simple question:
How can I get some results from a StoredProcedure ?
Sample Code:
CREATE PROCEDURE INV_IN
(INV_IN VARCHAR(12))
RETURNS
(RES_CODE VARCHAR(1))
AS
declare variable INVID Varchar(12);
declare variable INVTYPE Varchar(30);
declare variable INVPARTS Integer;
declare variable OBJNUM double Precision;
BEGIN
INVID = "";
select INV_ID, INV_TYPE, INV_PARTS, OBJNR from INVENTORY
where INV_ID = :INV_IN
into :INVID, :INVTYPE, :INVPARTS, :OBJNUM;
if (INVID = "") then
begin
RES_CODE = "0";
end
else
begin
RES_CODE = "1";
end
END;
The RES_CODE will return (testet), but
how can I get this RES-CODE value in my application?
Thanks
Gerhard J. Schober
-----------------------------------------------------------------------
DevCon Engineering
P.O.Box 179
9490 Vaduz
Principality of Liechtenstein
-----------------------------------------------------------------------
EMail: gjschober@...
Web1: www.devcon.li
Web2: www.onealarm.net
-----------------------------------------------------------------------
LAT 47° 09.8334' N
LON 009° 30.6067' E
ELEV 463.5 m
-----------------------------------------------------------------------
4C6B 5D10 84C0 48FD CE80 9CA1 0C74 34EA FA6C 6965
-----------------------------------------------------------------------
Privileged/Confidential Information may be contained in this message.
If you are not the addressee indicated in this message (or responsible
for delivery of the message to such person), you may not copy or
deliver this message to anyone. In such case, you should destroy this
message and kindly notify the sender by reply email. Please advise
immediately if you or your employer does not consent to Internet email
for messages of this kind. Opinions, conclusions and other information
in this message that do not relate to the official business of my firm
shall be understood as neither given nor endorsed by it.
-----------------------------------------------------------------------