SQL Error Code: -802 with Delphi 7 and ZeosLib Rev 113
Posted: 17.12.2006, 07:34
I am using ZeosLib Rev 113 (20061011) in Delphi 7.
I have a table that has a column defined as varchar(130). If the value of the column is a string with more than 83 characters, I get the following error when I try to read the row with the TZQuery component:
"Sql Error: arithmetic exception, numeric overflow, or string truncation. Error Code: -802."
If the length of the value of this field is less than or equal to 83, it works okay.
I have tried the following with both firebird 1.5 and 2.0, the default character set is WIN1252:
I have also tried "ZConnection1.Properties.Add('lc_ctype=WIN1252');" in place of "ZConnection1.Properties.Add('Codepage=WIN1252');"
How do I fix this problem?
Thank you for your help,
doug4
I have a table that has a column defined as varchar(130). If the value of the column is a string with more than 83 characters, I get the following error when I try to read the row with the TZQuery component:
"Sql Error: arithmetic exception, numeric overflow, or string truncation. Error Code: -802."
If the length of the value of this field is less than or equal to 83, it works okay.
I have tried the following with both firebird 1.5 and 2.0, the default character set is WIN1252:
Code: Select all
ZConnection1.Protocol := 'firebird-1.5'; // or 'firebird-2.0';
ZConnection1.Properties.Clear;
ZConnection1.Properties.Add('Dialect=3');
ZConnection1.Properties.Add('Codepage=WIN1252');
ZConnection1.Properties.Add('rolename=testuser');
How do I fix this problem?
Thank you for your help,
doug4