Stream read error on TIBCQuery

Discussion of open issues, suggestions and bugs regarding IBDAC (InterBase Data Access Components) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
upscene
Posts: 271
Joined: Thu 19 Oct 2006 08:13

Stream read error on TIBCQuery

Post by upscene » Tue 15 May 2018 12:59

Hi there,

I'm using IBDAC 6.1.4 in Delphi 2009, on a query with:

- Options.DescribeParams = true
- Options.DeferredBlobRead = true
- Options.CacheBlobs = false
- UniDirectional = true

I'm getting "stream read error" when requesting the field value for FieldByName(...).AsWideString on column RDB$RELATION_FIELDS.rdb$default_source

Any known issue with this?

I've set CacheBlobs to False, because when working with blobs of several hundreds MBs, the memory management seemed to not clear blob values when moving to the next row.

With regards,

Martijn Tonies

ViktorV
Devart Team
Posts: 2320
Joined: Wed 30 Jul 2014 07:16

Re: Stream read error on TIBCQuery

Post by ViktorV » Tue 15 May 2018 13:11

Unfortunately, we cannot reproduce the issue on the latest version IBDAC 6.1.7.
Check, please, make sure that you are using the client library supplied with InterBase (Firebird) distribution to which you are trying to connect.
In order for us to be able to give you a detailed answer, we need to have a sample demonstrating the specified behavior. Therefore, please compose a full sample demonstrating the described behavior and send it to us using the contact form https://www.devart.com/company/contactform.html including the scripts for creating database objects. Also specify the exact Firebird version.
Note, if the sample has a large size, please place it on free filehosting and send us the link using the contact form https://www.devart.com/company/contactform.html

upscene
Posts: 271
Joined: Thu 19 Oct 2006 08:13

Re: Stream read error on TIBCQuery

Post by upscene » Tue 15 May 2018 13:47

Additional info:

- Connection.Options.EnableMemos = true
- Connection.Options.UseUnicode = false
- Connection.Charset = ISO8859_1

It happens when reading the value the second time for the column, eg:

Code: Select all

IBCQuery2.Open;
  while not IBCQuery2.Eof
  do begin
       Memo1.Lines.Add(IBCQuery2.FieldByName('rdb$field_name').AsWideString + ' : ' +
                       IBCQuery2.FieldByName('field_default').AsWideString + ' - ' +
                       IBCQuery2.FieldByName('field_default').AsWideString);
       IBCQuery2.Next;
     end;
  IBCQuery2.Close;
If I remove that second read, it runs fine.

ViktorV
Devart Team
Posts: 2320
Joined: Wed 30 Jul 2014 07:16

Re: Stream read error on TIBCQuery

Post by ViktorV » Tue 15 May 2018 14:06

Unfortunately, we can't reproduce the issue in our environment

upscene
Posts: 271
Joined: Thu 19 Oct 2006 08:13

Re: Stream read error on TIBCQuery

Post by upscene » Tue 15 May 2018 15:01

Steps:
  • create a database, dialect 3, with charset ISO8859_1 in Firebird 2.5
  • create a table:

    Code: Select all

    create table test_table
    (
    col1 integer,
    col2 integer default 3,
    col3 varchar(200) default 'test'
    )
  • connection a TIBCConnection with the parameters I gave earlier
  • use a TIBCQuery with the options I gave earlier
  • use this for the SQL-query:

    Code: Select all

    select rf.rdb$field_name, rf.rdb$default_source as field_default
    from rdb$fields f left outer join rdb$field_dimensions fd on f.rdb$field_name = fd.rdb$field_name 
         join rdb$relation_fields rf on f.rdb$field_name = rf.rdb$field_source 
    where rf.rdb$relation_name = 'TEST_TABLE'
    order by rf.rdb$field_position, fd.rdb$dimension
  • use the code I gave earlier > error.
Hope this helps.

ViktorV
Devart Team
Posts: 2320
Joined: Wed 30 Jul 2014 07:16

Re: Stream read error on TIBCQuery

Post by ViktorV » Tue 15 May 2018 15:16

We investigated the problem according to your description.
Unfortunately, we cannot reproduce the issue on the latest version IBDAC 6.1.7.
In order for us to be able to give you a detailed answer, we need to have a sample demonstrating the specified behavior. Therefore, please compose a full sample demonstrating the described behavior and send it to us using the contact form https://www.devart.com/company/contactform.html

Post Reply