Page 1 of 1

Error column is not defined

Posted: Thu 19 May 2011 22:48
by evdkraan
Using IBDac version 3.60.0.22 and converting an interbase 2007 database form charset NONE to UTF8, I get an error when using a select from a stored procedure where one or more columns returned is a BLOB and UseUnicode is True.

The error is in the unit IBCClasses in procedure GetBlobCharset when checking the result of the call to isc_blob_lookup_desc.

When UseUnicode is false, the call to this procedure is not made and the procedure works, but then the strings returned for the varchar columns are malformed.

When using the original database all works fine as well

Can you please advice me how to get this working?

Posted: Wed 25 May 2011 11:33
by Dimon
This problem is connected with incorrect work of the InterBase server and we cannot influence it. The point is that InterBase returns the relation name of these fields as a stored procedure name and not a table name. And we cannot know the right relation name of the field.
To solve this problem, apply the following change. Find the code below in the TGDSRecordSet.InternalInitFields method of the IBCClasses.pas unit:

Code: Select all

  Check(Res);
  Field.CharsetID := Marshal.ReadInt16(BlobDesc, 2);
and change it to the code:

Code: Select all

  if Res  335544396 then begin
    Check(Res);
    Field.CharsetID := Marshal.ReadInt16(BlobDesc, 2);
  end;

Posted: Tue 31 May 2011 08:09
by evdkraan
Thanks for the workaround, it now works flawlessly.

Will I have to make this code change for each next release or will this be implemented in a next build ?

Posted: Tue 31 May 2011 08:21
by AndreyZ
This solution will be included in the next IBDAC build.

Posted: Tue 31 May 2011 09:18
by evdkraan
Great, thank you for the support.