Skip site navigation (1) Skip section navigation (2)

Re:, VB6, RDO, rdoResultset.RowCount

From: Hélder M(dot) Vieira <hmv(at)mail(dot)telepac(dot)pt>
To: <pgsql-odbc(at)postgresql(dot)org>
Subject: Re:, VB6, RDO, rdoResultset.RowCount
Date: 2005-11-10 02:16:48
Message-ID: 009201c5e59c$d0147e30$580bfea9@hmv02 (view raw, whole thread or download thread mbox)
Lists: pgsql-odbc
> this was discussed earlier today i think...
> the recordset has an EOF (end of file) flag. if rs.EOF equals False, then 
> there are rows in the resultset.

Thanks and yes, EOF is indeed a much cleaner way for early testing of a
potentially empty resultset.
But now I have another disturbing situation, that came up during EOF
If I have a non-empty resultset, traveling all the way (using MoveNext)
until EOF is found doesn't produce a valid RowCount.
Only a MoveLast seems to do the job.

I created a five rows / two columns table, opened a 'select *' resultset and
performed the following sequence:

   With ordoRs
      While Not .EOF
         Debug.Print .rdoColumns("f1"), .rdoColumns("f2"), .RowCount ' <----  
RowCount is always equal to 0
      Debug.Print , , .RowCount ' <---- RowCount is correct
   End With

This seems somewhat dangerous to me, although I must say I never made a
similar test with any ODBC driver (as far as I can remember, I always used
MoveLast to get an accurate RowCount).

Helder M. Vieira

In response to


pgsql-odbc by date

Next:From: meDate: 2005-11-10 02:44:37
Subject: Re:, VB6, RDO, rdoResultset.RowCount
Previous:From: meDate: 2005-11-10 01:16:22
Subject: Re:, VB6, RDO, rdoResultset.RowCount

Privacy Policy | About PostgreSQL
Copyright © 1996-2018 The PostgreSQL Global Development Group