Icon View Incident Report

Serious Serious
Reported By: Oliver Bock
Reported On: 5/18/2005
For: Version 4.20 Build 3
# 2051 SQL INSERT Sub-Queries Produce Incorrect Data When Inserting From String to Memo Columns

When inserting values from varchar columns into memo columns, null characters are added up to length of original varchar.

To reproduce:

1. Run the code below in dbsys.exe.
2. Open table B.
3. Double click on one of the MEMO fields.
4. Observe that the length is reported as 50 characters.

If you retrieve the value using Delphi code then you will get a string of length 50 with trailing null characters.

drop table if exists A;
drop table if exists B;
 
create table A (id integer, desc varchar(50));
create table B (id integer, desc memo);
insert into A values (1, 't1');
insert into A values (2, 't2');
insert into A values (3, 't3');
insert into A values (4, 't4');

insert into B 
select id, desc
from A;



Resolution Resolution
Fixed Problem on 6/2/2005 in version 4.21 build 1


Products Affected Products Affected
DBISAM Additional Software and Utilities
DBISAM ODBC Client-Server
DBISAM ODBC Client-Server with Source
DBISAM ODBC Standard
DBISAM ODBC Standard with Source
DBISAM VCL Client-Server
DBISAM VCL Client-Server with Source
DBISAM VCL Standard
DBISAM VCL Standard with Source

Image