RE: Visual Basic and PostgreSQL ODBC - Mailing list pgsql-general

From Eric Ridge
Subject RE: Visual Basic and PostgreSQL ODBC
Date
Msg-id D3ADE25911614840BC69C72E3171E4ED0280A7@tcdiexch.tcdi.com
Whole thread Raw
In response to Visual Basic and PostgreSQL ODBC  ("Ryan C. Bonham" <Ryan@srfarms.com>)
List 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

pgsql-general by date:

Previous
From: missive@frontiernet.net (Lee Harr)
Date:
Subject: Re: Problems linking with libpq
Next
From: Svenne Krap
Date:
Subject: "Oracle's ROWNUM"