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)
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.