Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Mailing Lists -> Oracle-L -> how fetch into output host array

how fetch into output host array

From: Umesh Chander Sharma <U.CHANDER_at_ponl.com>
Date: Tue, 16 May 2000 14:35:00 +0100
Message-Id: <10499.105735@fatcity.com>


Hi Gurus,

I am stuck in a PRO*C problem, ver. 1.5, Oracle 7.1.6 .

Have following table :

EMP
---

empid number primary key
name varchar2(10) not null

and have declared following host variable in our PRO*C program

int tempid^3];
int A_empid^3];
varchar2 A_name^3]^11];

tempid contains following values

tempid^0]=1;
tempid^1]=2;
tempid^2]=3;

above EMP table contains following records :

empid name
----- ----

1       jit
2       abv
3       xyz
4       jfg

PRO*C program contains following SQL :

select empid,name into :A_empid,:A_name from EMP where empid = :tempid ;

It should return 3 rows but it is returning none ?

Please advise what seems to have gone wrong as it is our requirement to run this SQL once for all elements of tempid.

Any suggestion is highly appreciated. Received on Tue May 16 2000 - 08:35:00 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US