Print Thread
Error ORA-01480 on long bind string.
#3449 05/17/02 11:27 PM
Joined: May 2002
Posts: 2
Irvine, CA, USA
S
ShawnP Offline OP
Member
OP Offline
Member
S
Joined: May 2002
Posts: 2
Irvine, CA, USA
I am receiving an "ORA-01480: trailing null missing from STR bind value" when inserting a 1800 character string into a VARCHAR2(2000) on a 9i database with the WE8MSWIN1252 UTF-8 character set. Client is 817 on WIN2000 with the WE8ISO8859P1 character set. DOA version 3.4.3.

I believe the problem is originating in the TOracleQuery.BindVariables method with the size of the buffer passed to the OCIBindByName call. The variable lBufSize is set to 1000, (4000 div CharacterSize), but lBuf contains a 1800 character string.

Do you have a workaround for this?

Thanks.

------------------
ShawnP


ShawnP
Re: Error ORA-01480 on long bind string.
#3450 05/21/02 11:24 PM
Joined: Aug 1999
Posts: 22,221
Member
Offline
Member
Joined: Aug 1999
Posts: 22,221
For multi-byte character sets you need to set TOracleSession.BytesPerCharacter to bcAutoDetect.

------------------
Marco Kalter
Allround Automations


Marco Kalter
Allround Automations
Re: Error ORA-01480 on long bind string.
#3451 05/24/02 04:26 AM
Joined: May 2002
Posts: 2
Irvine, CA, USA
S
ShawnP Offline OP
Member
OP Offline
Member
S
Joined: May 2002
Posts: 2
Irvine, CA, USA
[quote]Originally posted by mkalter:
For multi-byte character sets you need to set TOracleSession.BytesPerCharacter to bcAutoDetect.

[/quote]

We already do that. We modified the TOracleSession constructor so it sets FBytesPerCharacter to bcAutoDetect.


------------------
ShawnP


ShawnP
Re: Error ORA-01480 on long bind string.
#3452 05/27/02 09:38 PM
Joined: Aug 1999
Posts: 22,221
Member
Offline
Member
Joined: Aug 1999
Posts: 22,221
I didn't read your message close enough. Apparently you have a 4-byte character set, so 1800 characters is too much.

------------------
Marco Kalter
Allround Automations


Marco Kalter
Allround Automations
Re: Error ORA-01480 on long bind string.
#3453 09/25/03 09:55 AM
Joined: Feb 2001
Posts: 20
Hong Kong
N
Member
Offline
Member
N
Joined: Feb 2001
Posts: 20
Hong Kong
Hi,

I also have the same problem and the session already set bcAutoDetect. I found it is not related to the length of the field as I increase the length of the field in database from 2000 to 2300 say, the same error occurs.

Any help ?

Current version 3.4.6.1 with D5
Chinese OS but the data key in is just Enlish characters and #D#A

Regards,
Nelson.

Re: Error ORA-01480 on long bind string.
#3454 09/25/03 09:58 AM
Joined: Feb 2001
Posts: 20
Hong Kong
N
Member
Offline
Member
N
Joined: Feb 2001
Posts: 20
Hong Kong
To further explain,
Currently, it can save upto 1300 English characters + 13 #D#A
for a field of varchar2(2000)

Regards,
Nelson.

Re: Error ORA-01480 on long bind string.
#3455 09/25/03 07:03 PM
Joined: Aug 1999
Posts: 22,221
Member
Offline
Member
Joined: Aug 1999
Posts: 22,221
This would indicate that your NLS_LANG uses a 3 byte character set.

------------------
Marco Kalter
Allround Automations


Marco Kalter
Allround Automations
Re: Error ORA-01480 on long bind string.
#3456 09/26/03 09:24 AM
Joined: Feb 2001
Posts: 20
Hong Kong
N
Member
Offline
Member
N
Joined: Feb 2001
Posts: 20
Hong Kong
my NLS_LANG is AMERICAN_AMERICA.ZHT16BIG5
How to fix it if I wish to store 2000 chars in addition to some #D#A (line feed) ? Will it exceed the max. length of the SQL string ?

Regards,
Nelson.


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.037s Queries: 13 (0.006s) Memory: 2.5265 MB (Peak: 3.0418 MB) Data Comp: Off Server Time: 2024-05-21 21:22:02 UTC
Valid HTML 5 and Valid CSS