ORA-1480 error : trailing NULL missing from BIND variable (version 4.0.6.2 on BCB4)

Nathanvda

Member
Hi there,

i am using DOA 4.0.6.2, for CBuilder 4, and i have the ORA-1480 error, mentioned here a few times. We have a special program to copy tables (specific records) from one database to another (as a kind of promotion mechanism).

The code we use is like this :

for (int j = 0; j < Source->Fields->Count; j++)
{
AnsiString Field = Source->Fields->Fields[j]->FieldName;
AnsiString sourceString = Source->FieldByName(Field)->AsString;
int len = sourceString.Length() ;
Target->FieldByName(Field)->AsString = sourceString;
}
Target->Post();

And i get the error on the post ...

I then tried to replace this code, if it occured, using a query ... and i get exactly the same error.

For completeness : we use UTF-8 Oracle 10g, my local NLS-LANG = AMERICAN_AMERICA.WE8ISO8859P1, the BytesPerCharacter is set to bcAutoDetect.

Please can you help me ?

Nathan Van der Auwera
 
One small remark : the database is 4 bytes per character, but the table is set 1 byte per character, for backward compatibility.

Could this cause some confusion ?
 
Back
Top