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

Home -> Community -> Usenet -> c.d.o.misc -> Problems with update in OCI

Problems with update in OCI

From: Jens Lundell <Jens.Lundell_at_cpmx.saic.com>
Date: 1998/03/31
Message-ID: <352190B0.9477D2E6@cpmx.saic.com>#1/1

I have problems using update statements in OCI. I'm using C in a NT environment with Oracle 7.3. The following code works:

text *update= (text *) "UPDATE aTable SET qty=54 WHERE bol='55'";                                                                          

oparse(&cursor,update,(sb4)-1,0,1); oexn(&cursor,1,0);
ocom(&lda);

But when I use a binding variable it does not work (no update is made):

char c[21];
text *update= (text *) "UPDATE aTable SET qty=54 WHERE bol=:c";

               
strcpy(c,"55");        					  	  

oparse(&cursor,update,(sb4)-1,0,1); obndrv(&cursor,(text
*)":c",-1,(ub1*)c,(sword)sizeof(c),STRING_TYPE,-1,(sb2 *)0,(text
*)0,-1,-1);

oexn(&cursor,1,0);
ocom(&lda);

Please, can anyone help me?

Thanks,

  Jens Received on Tue Mar 31 1998 - 00:00:00 CST

Original text of this message

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