|
Error ORA-01480 on long bind string.
|
Joined: May 2002
Posts: 2 Irvine, CA, USA
Member
|
OP
Member
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.
|
Joined: Aug 1999
Posts: 22,221
Member
|
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.
|
Joined: May 2002
Posts: 2 Irvine, CA, USA
Member
|
OP
Member
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.
|
Joined: Aug 1999
Posts: 22,221
Member
|
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.
|
Joined: Feb 2001
Posts: 20 Hong Kong
Member
|
Member
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.
|
Joined: Feb 2001
Posts: 20 Hong Kong
Member
|
Member
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.
|
Joined: Aug 1999
Posts: 22,221
Member
|
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.
|
Joined: Feb 2001
Posts: 20 Hong Kong
Member
|
Member
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.
|
|
|
|
|
|