Forum Stats

  • 3,815,999 Users
  • 2,259,128 Discussions
  • 7,893,360 Comments

Discussions

not get correct OUT value of pl sql procedure in C

754969
754969 Member Posts: 21
edited Feb 20, 2010 3:40AM in SQL & PL/SQL
Hello,

I am call a below procedure from C

getpk(NAM CHAR,MAIL OUT CHAR) AS
BEGIN
SELECT PK_RECNO INTO MAIL FROM CURVA1 ;
END;

So in oracle i get correct value e.g 'PK_100', But when I am try to read it from C. I did not see correct value. The C sample code is as follows.

void main()
{
EXEC SQL BEGIN DECLARE SECTION;
int dept_no;
char pk[20];
char *i[20];
EXEC SQL END DECLARE SECTION;

connect();

EXEC SQL EXECUTE
BEGIN
harshal.getpk('arun',:i);
END;
END-EXEC;


printf("\n\n dept_no:-%s",i);
EXEC SQL WHENEVER SQLERROR DO sql_error();
getch();
}


So plse any one help me.

Thanx in Advance.
Hp.

Edited by: user11440852 on Feb 19, 2010 6:17 PM
Tagged:

Answers

This discussion has been closed.