OCI calls

From: Ravi Kodali <kodali_at_cclabs.missouri.edu>
Date: 1996/01/31
Message-ID: <4eovhd$t08_at_news.missouri.edu>#1/1


I was trying to update some records with C and OCI and could someone tell me if I need to bind the variable before calling 'oexec' or can I directly call 'oexec' after 'oparse'.

say variable 'Load' is pointer to some data.

now I tried this way.

 strcpy(array,"UPDATE USER_INFO SET DESCRIPTION = '"); 
 strcat(array,Load); 
 strcat(array,"' WHERE USER_ID = 'dale'"); 

 oparse(&cda, array, -1, 0, 2);

 obndra(&cda,(text *) "dale",-1,(text *) Load,sizeof(sword),\

         VARCHAR2_TYPE,-1,(sb2 *) 1,alen,arcode,len,&max ,(text
                  0,-1,-1));

 oexec(&cda);

and when I try to bind it before executing it, gives me this error

ORA-01036: illegal variable name/number Processing OCI function OBNDRA
Error logging off!

and I tried executing it directly without binding and it takes forever though it does not give an error.

can someone tell me if I should bind before executing it at all for an UPDATE and also when is that I have to bind at all.

thanks in advance.

Ravi

--
********************************************************** 

* Programmer/Analyst I (Oracle DBA) *
* Centre for Technology Innovations in Education(CTIE) *
* University of Missouri - Columbia *
* Columbia MO - 65211 *
* Tel # Home - (314)815-9176 *
* Off - (314)882-2162 *
* email - kodali_at_tie.missouri.edu *
**********************************************************
Received on Wed Jan 31 1996 - 00:00:00 CET

Original text of this message