From: | "Eric Ridge" <ebr(at)tcdi(dot)com> |
---|---|
To: | <pgsql-general(at)postgresql(dot)org> |
Subject: | RE: Visual Basic and PostgreSQL ODBC |
Date: | 2001-07-28 18:10:35 |
Message-ID: | D3ADE25911614840BC69C72E3171E4ED0280A7@tcdiexch.tcdi.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
> Two solutions use .EOF or .BOF on your recordset, or
> .MoveLast, get the
> .RecordCount, then a .MoveFirst. If you don't do the
> .MoveLast the record
> count tends to stay at it's last value or one. This should
> get you on the
> right track, note I haven't tried this with postgresql as a
> backend, but
> it's what you have to do with MS backends.
If you're going to do the .MoveLast, .RecordCount, .MoveFirst, make sure
your resultset is scrollable (ie, not forward-only). This method can be
very inefficient if you have many rows, and you don't plan on using all
of them in your application.
Another approach is to execute a SELECT COUNT(*) FROM TABLE WHERE <where
clause>, to get the record count.
eric
From | Date | Subject | |
---|---|---|---|
Next Message | Svenne Krap | 2001-07-28 21:03:07 | "Oracle's ROWNUM" |
Previous Message | Lee Harr | 2001-07-28 14:58:44 | Re: Problems linking with libpq |