Icon View Incident Report

Serious Serious
Reported By: Volker Nabholz
Reported On: 8/19/2002
For: Version 3.13 Build 1
# 1179 Using UNION with Multiple SELECT Statements that Return BLOB Columns Causes Error

I use DBIsam v3.13 with D6 and I have the following problem:

DBIsam Engine Error #9494 Too many blobs opened in the table '15080'

I create two tables with same structure and put them together in one query with the union all command. If I'll open the query I get the error message. The tables itself are created correctly. With the DBIsam v3.10 this is working without problems.

Below you find the code of creation and query command:

  fQRY.SQL.Clear;
  fQRY.SQL.Add('create table if not exists "'   fName   '"');
  fQRY.SQL.Add('(');
  fQRY.SQL.Add('ID char(12),');
  fQRY.SQL.Add('AID autoinc,');
  fQRY.SQL.Add('PID char(12),');
  fQRY.SQL.Add('TT char(1),');
  fQRY.SQL.Add('OZ char(15),');
  fQRY.SQL.Add('TEXTDAT char(150),');
  fQRY.SQL.Add('TEXTMEMO blob(0,1),');
  fQRY.SQL.Add('USB boolean');
  fQRY.SQL.Add('primary key (ID) compress dupbyte');
  fQRY.SQL.Add(');');
  fQRY.SQL.Add('create index if not exists OZ ON "'   fName   
'" (OZ)
    compress dupbyte;');
  fQRY.SQL.Add('create index if not exists PID ON "'   fName   
'" (PID)
    compress dupbyte');
  try
    fQRY.ExecSQL;
  except
  end;

  qryGK.SQL.Clear;
  for i := 0 to DBSiGeInfos.Count - 1 do
  begin
    qryGK.SQL.Add('select * from DB'   IntToStr(i));
    if i < DBSiGeInfos.Count - 1 then
      qryGK.SQL.Add('union all');
  end;
  try
    qryGK.Open;
  except
  end;



Comments Comments
The engine was not closing opened BLOBs properly during the merging of the result sets for the UNION operation.


Resolution Resolution
Fixed Problem on 8/20/2002 in version 3.14 build 1
Image