Home » Developer & Programmer » Precompilers, OCI & OCCI » ORA-01480: trailing null missing from STR bind value
ORA-01480: trailing null missing from STR bind value [message #232791] Mon, 23 April 2007 05:06 Go to next message
ataufique
Messages: 79
Registered: November 2006
Member
I have written the below code in PRO*C, when i try to execute
it is giving the error
" ORA-01480: trailing null missing from STR bind value "

EXEC SQL UPDATE TAP_REJECT_DETAILS
SET VLD_FILE_NAME = :v_filename,
VLD_DATE = :filedate
WHERE 'C'||'D'||SRCE_PLMN_CODE||DEST_PLMN_CODE||FILE_SEQ_NO
= :filename AND RECV_DATE IN (SELECT MAX(RECV_DATE) FROM TAP_REJECT_DETAILS WHERE 'C'||'D'||SRCE_PLMN_CODE||DEST_PLMN_CODE||FILE_SEQ_NO = :filename);


Re: ORA-01480: trailing null missing from STR bind value [message #232801 is a reply to message #232791] Mon, 23 April 2007 05:40 Go to previous messageGo to next message
tahpush
Messages: 961
Registered: August 2006
Location: Stockholm/Sweden
Senior Member

ORA-01480 trailing null missing from STR bind value
Cause: A bind variable specified as type SQLT_STR is not terminated
with and ASCII null (0) character.
Re: ORA-01480: trailing null missing from STR bind value [message #232940 is a reply to message #232801] Tue, 24 April 2007 03:14 Go to previous messageGo to next message
ataufique
Messages: 79
Registered: November 2006
Member
Hi Tahpush,
I have included the part of my code below..please if you can tell me what
exactly u r trying to tell..Thanks

EXEC SQL BEGIN DECLARE SECTION;
char v_filename[36];
char filename[17];
char filedate[26];
EXEC SQL END DECLARE SECTION;
int ret_val;
int filesize;

v_filename[0] = '\0';
filename[0] = '\0';
filedate[0] = '\0';
ret_val = 0;
filesize = 0;

strcpy(v_filename, p_filename);
v_filename[36] = '\0';
strncpy(filename, p_filename, 17);
filename[17] = '\0';
strcpy(filedate, p_filedate);
filesize = p_filesize;

EXEC SQL UPDATE TAP_REJECT_DETAILS
SET VLD_FILE_NAME = :v_filename
VLD_DATE = :filedate
WHERE
('C'||'D'||SRCE_PLMN_CODE||DEST_PLMN_CODE||FILE_SEQ_NO) =:filename
AND RECV_DATE IN (SELECT MAX(RECV_DATE)
FROM TAP_REJECT_DETAILS
WHERE
('C'||'D'||SRCE_PLMN_CODE||DEST_PLMN_CODE||FILE_SEQ_NO = :filename));
v_filename[0] = '\0';
filedate[0] = '\0';
Re: ORA-01480: trailing null missing from STR bind value [message #232956 is a reply to message #232940] Tue, 24 April 2007 04:36 Go to previous messageGo to next message
tahpush
Messages: 961
Registered: August 2006
Location: Stockholm/Sweden
Senior Member

If you have access to metalink check docid 69130.1

and do a search for
"PRO*C ORA-01480 trailing null missing from STR bind value"


Re: ORA-01480: trailing null missing from STR bind value [message #232961 is a reply to message #232956] Tue, 24 April 2007 04:51 Go to previous messageGo to next message
ataufique
Messages: 79
Registered: November 2006
Member
Got the below from metalink...but still i dont understand the error..

Runtime Errors:

ORA-1480 - Trailing null missing from str bind variable.

<metalink content removed>

[Updated on: Tue, 24 April 2007 14:32] by Moderator

Report message to a moderator

Re: ORA-01480: trailing null missing from STR bind value [message #232971 is a reply to message #232961] Tue, 24 April 2007 05:43 Go to previous messageGo to next message
tahpush
Messages: 961
Registered: August 2006
Location: Stockholm/Sweden
Senior Member

Hmm you cant post copyrighted material, that's why I only gave you the docids
Re: ORA-01480: trailing null missing from STR bind value [message #233071 is a reply to message #232971] Tue, 24 April 2007 09:16 Go to previous messageGo to next message
tahpush
Messages: 961
Registered: August 2006
Location: Stockholm/Sweden
Senior Member

Quote:
EXEC SQL UPDATE TAP_REJECT_DETAILS
SET VLD_FILE_NAME = :v_filename
VLD_DATE = :filedate


What datatypes are VLD_FILE_NAME and VLD_DATE ?
Re: ORA-01480: trailing null missing from STR bind value [message #242162 is a reply to message #233071] Thu, 31 May 2007 16:37 Go to previous messageGo to next message
skavi
Messages: 1
Registered: May 2007
Junior Member
Hi,
Try to increase the datatype length and compile again. Mostly that should fix it.
Thanks.
Re: ORA-01480: trailing null missing from STR bind value [message #242426 is a reply to message #242162] Fri, 01 June 2007 23:27 Go to previous message
ataufique
Messages: 79
Registered: November 2006
Member
thanks..
This is fixed ..with the help of tahpush..
after terminating filedate with ASCII null (0) character.
filedate[26] = '\0';
Previous Topic: MetaData.getString(MetaData::ATTR_NAME) will not return column name more then 15 characters..???
Next Topic: Procob not found
Goto Forum:
  


Current Time: Thu Mar 28 12:29:21 CDT 2024