Re: [INTERFACES] ODBC & Postgres problem

From: Byron Nikolaidis <byronn(at)insightdist(dot)com>
To: Tim Bosinius <tim(at)bosinius(dot)de>
Cc: "'pgsql-interfaces(at)postgresql(dot)org'" <pgsql-interfaces(at)postgreSQL(dot)org>
Subject: Re: [INTERFACES] ODBC & Postgres problem
Date: 1998-05-25 21:22:19
Message-ID: 3569E10B.85B9F696@insightdist.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

In response to

Browse pgsql-interfaces by date

  From Date Subject
Next Message Byron Nikolaidis 1998-05-26 04:11:22 ODBC Cursor Libary
Previous Message Tim Bosinius 1998-05-25 21:00:35 ODBC & Postgres problem