Error column is not defined

Discussion of open issues, suggestions and bugs regarding IBDAC (InterBase Data Access Components) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
evdkraan
Posts: 11
Joined: Wed 20 Jan 2010 23:07

Error column is not defined

Post by evdkraan » Thu 19 May 2011 22:48

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?

Dimon
Devart Team
Posts: 2910
Joined: Mon 05 Mar 2007 16:32

Post by Dimon » Wed 25 May 2011 11:33

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;

evdkraan
Posts: 11
Joined: Wed 20 Jan 2010 23:07

Post by evdkraan » Tue 31 May 2011 08:09

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 ?

AndreyZ

Post by AndreyZ » Tue 31 May 2011 08:21

This solution will be included in the next IBDAC build.

evdkraan
Posts: 11
Joined: Wed 20 Jan 2010 23:07

Post by evdkraan » Tue 31 May 2011 09:18

Great, thank you for the support.

Post Reply