fetchall = false && filter

Discussion of open issues, suggestions and bugs regarding SDAC (SQL Server Data Access Components) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
Ludek
Posts: 296
Joined: Thu 12 Oct 2006 09:34

fetchall = false && filter

Post by Ludek » Wed 07 Nov 2007 09:11

Hi, I'm having following problem with all new sdac versions (4.10, 4.30):

I have a query with fetchall = false and fetchrows set to some small number.

The query has property filtered set to true and a filter expression set.
If I open this query, I get sometimes empty result set, although something should be there - if i set (after opening the query) the filtered property to false and back to true, the records appear.

I think, the problem is following: if the filter does not match any of the rows in first fetch block, the fetching is aborted.

my testing db:

Code: Select all

create database test
go
use test
go

create table test (
  dt datetime
)

insert into test values('1.1.2007')
insert into test values('1.1.2007')
insert into test values(null)
insert into test values(null)
insert into test values(null)
testing query must have following properties set:

fetchall = false
fetchrows = 1
filtered = true
filter = 'dt is null'
sql = select dt from test

if i make ".open" on this query, no records appear, although the query contains 2 records with "dt" set to "null".
I must set after opening the query the filtered property to false and back to true so that I can see this 2 records.

Please help!
Ludek.

Antaeus
Posts: 2098
Joined: Tue 14 Feb 2006 10:14

Post by Antaeus » Fri 09 Nov 2007 16:34

Thank you for information. The investigation of the problem is in progress. As soon as we have results or we need more information, we will let you know.

Ludek
Posts: 296
Joined: Thu 12 Oct 2006 09:34

Post by Ludek » Mon 19 Nov 2007 07:40

I can't see any correction description in the new SDAC build 4.30.0.13. I hope, you only forgot to write this... Please don't tell me I have to wait next 1 or 2 months for the next build... :cry:

Antaeus
Posts: 2098
Joined: Tue 14 Feb 2006 10:14

Post by Antaeus » Tue 20 Nov 2007 09:30

Fix to this problem was included into the last SDAC (4.30.0.13). It is already available for download.
We have fixed the list of bug fixes at the forum. Thank you for information.

Ludek
Posts: 296
Joined: Thu 12 Oct 2006 09:34

Post by Ludek » Tue 20 Nov 2007 16:38

GREAT! I'll have a try soon!

Post Reply