Print Thread
ORA-1480 error
#64158 08/23/22 03:06 AM
Joined: Aug 2022
Posts: 3
T
TAKAY Offline OP
Member
OP Offline
Member
T
Joined: Aug 2022
Posts: 3
Translated by Google Translate.
I am posting for the first time.
I am using Delphi10.3.3 and DOA4.1.3.5 to connect to Oracle19c.
Oracle's character code uses JA16SJIS.
I get an ORA-1480 error, "trailing null missing from STR bind value" when trying to INSERT a string of about 2000 bytes.
BytesPerCharacter of TOracleSession is set to bcAutoDetect.
Is there any way to solve this?
I searched the source code and found the following description in the relevant part.
"Q.SQL.Text := 'select length(chr(2000000000)) l4, length(chr(2000000)) l3, length(chr(20000)) l2, ''c'' c1 from dual';"
Could you tell me the meaning of this SELECT statement?
Thank you very much.

Re: ORA-1480 error
TAKAY #64159 08/23/22 03:18 AM
Joined: Aug 2022
Posts: 3
T
TAKAY Offline OP
Member
OP Offline
Member
T
Joined: Aug 2022
Posts: 3
P.S.
The character string is a character string exceeding 2000 bytes in SJIS code including Japanese.
Also when I set BytesPerChanacter to bc1Byte I get no error.
Is it okay to set BytesPerChanacter to bc1Byte during normal use?

Re: ORA-1480 error
TAKAY #64160 08/23/22 08:06 AM
Joined: Aug 1999
Posts: 22,173
Member
Offline
Member
Joined: Aug 1999
Posts: 22,173
I'm not sure what could cause this. If forcing the character size to 1 byte per character fixes it, then this may be a solution.


Marco Kalter
Allround Automations
Re: ORA-1480 error
TAKAY #64165 08/24/22 02:56 AM
Joined: Aug 2022
Posts: 3
T
TAKAY Offline OP
Member
OP Offline
Member
T
Joined: Aug 2022
Posts: 3
Thank you for your reply.
I understand that setting 1 byte is not a problem.
By the way, I also wrote in the question,
”select length(chr(2000000000)) l4, length(chr(2000000)) l3, length(chr(20000)) l2, 'c' c1 from dual”
Can you tell me what this SELECT tells me?
Thank you.


Moderated by  support 

Link Copied to Clipboard
Powered by UBB.threads™ PHP Forum Software 7.7.4
(Release build 20200307)
Responsive Width:

PHP: 7.1.33 Page Time: 0.033s Queries: 15 (0.007s) Memory: 2.5079 MB (Peak: 3.0377 MB) Data Comp: Off Server Time: 2024-03-28 23:02:47 UTC
Valid HTML 5 and Valid CSS