Home » Developer & Programmer » Precompilers, OCI & OCCI » ORA-01480
ORA-01480 [message #121961] Thu, 02 June 2005 00:31
bobbie_ch
Messages: 2
Registered: June 2005
Junior Member
We have the following Pro*C function.

void GetCtlNum( void ) {
exec sql begin declare section;
char ctl_num[13];
EXEC SQL VAR ctl_num IS STRING(13);
exec sql end declare section;

EXEC SQL whenever sqlerror do SQLError();
EXEC SQL whenever not found continue;

EXEC SQL
select to_char(edi_ctl_seq.nextval)
into :ctl_num
from dual;
Table = U0001;
strcpy( TableName[U0001], "GetCtlNum" );
strcpy(CtlNum , ctl_num);
}

All was fine when we were using Oracle 8i. We have recently moved to 9i. A call to this function now gives the following error:

SQLERROR -1480 on GetCtlNum ORA-01480: trailing null missing from STR bind value

Can anyone help ? I dont know much about Pro*C. So, will truly appreciate if anyone can modify the code for me, so that the error is removed.
Previous Topic: Problems with OCI for the Apple OSX
Next Topic: how cobol program can run in oracle
Goto Forum:
  


Current Time: Sat Dec 10 02:24:29 CST 2022