Re: [INTERFACES] ODBC & Postgres problem

Поиск
Список
Период
Сортировка
От Byron Nikolaidis
Тема Re: [INTERFACES] ODBC & Postgres problem
Дата
Msg-id 3569E10B.85B9F696@insightdist.com
обсуждение исходный текст
Ответ на ODBC & Postgres problem  (Tim Bosinius <tim@bosinius.de>)
Список pgsql-interfaces

Tim Bosinius wrote:

> The second problem I run into is that when I use RDO or RDC/RDO I cannot activate the
> "UseCursor" Option for the ODBC driver and I everytime I try to insert,update or
> delete a record I am told that the resultset is writeprotected (Error number 40048)
>

When the "Use Cursor" option is checked, the driver will use the Postgres declare/fetch mechanism to retrieve a set of
rows from the backend into its 100 row cache.  Perhaps the name is confusing because odbc has the concept of scrollable
cursors, which is entirely different.  When checked, you get efficient, lets say read-only access, to your data.  It is
especially good for large tables, because if you were to try to pull all of the records of a large table into memory,
you
probably would crash your system.

When "Use Cursors" is checked, the driver dis-allows SQLExtendedFetch and will only support a forward only cursor.
This
is useful when all you care about is efficient read-only access.   When it is not checked, it will allow a "static"
cursor and SQLExtendedFetch also.  This is probably what you want.  At least under mfc, however, you need to use the
odbc
cursor library dll to be able to do recordset updates, because the driver does not support positioned updates or
SQLSetPos.

I am currently testing these things with mfc and hopefully will know more soon.  The more feedback I can get regarding
scrolling cursors with mfc or basic, the better things will be.

There is also the concept of the keyset driven cursor, which the driver currently does not support.  This corresponds
to
the dynaset on mfc.

If you look at the interfaces list, you may see that I mentioned cursor support and what kind of options we are looking
into supporting.  I am glad these problems are coming out because I want to understand these cursor types and also
support them better.

Byron


В списке pgsql-interfaces по дате отправления:

Предыдущее
От: Tim Bosinius
Дата:
Сообщение: ODBC & Postgres problem
Следующее
От: Byron Nikolaidis
Дата:
Сообщение: ODBC Cursor Libary