RE: Visual Basic and PostgreSQL ODBC

Поиск
Список
Период
Сортировка
От Eric Ridge
Тема RE: Visual Basic and PostgreSQL ODBC
Дата
Msg-id D3ADE25911614840BC69C72E3171E4ED0280A7@tcdiexch.tcdi.com
обсуждение исходный текст
Ответ на Visual Basic and PostgreSQL ODBC  ("Ryan C. Bonham" <Ryan@srfarms.com>)
Список 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 по дате отправления:

Предыдущее
От: missive@frontiernet.net (Lee Harr)
Дата:
Сообщение: Re: Problems linking with libpq
Следующее
От: Svenne Krap
Дата:
Сообщение: "Oracle's ROWNUM"