Skip site navigation (1) Skip section navigation (2)

Patch for cursor type fallback

From: "Mark G(dot) Adams" <mgadams(at)ca(dot)stilo(dot)com>
To: pgsql-odbc(at)postgresql(dot)org
Subject: Patch for cursor type fallback
Date: 2005-06-23 15:53:45
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-odbc
According to MSDN docs for SQLSetStmtAttr, if you try to request a
cursor type which isn't supported, the driver should fall back to a
supported type, set an appropriate SQLState and return

Currently, if a SQL_ATTR_CURSOR_TYPE of SQL_CURSOR_DYNAMIC is requested,
we fall back to SQL_CURSOR_FORWARD_ONLY and no warning is given; this is
simply because we don't explicitly check for SQL_CURSOR_DYNAMIC.

A better solution is to check for SQL_CURSOR_DYNAMIC, fall back to
SQL_CURSOR_KEYSET_DRIVEN and set a warning accordingly.

Also, currently if SQL_CURSOR_KEYSET_DRIVEN is requested and only static
cursors are supported, we fall back without returning a warning.

Attached is a patch implementing both of the above against

Mark G. Adams

Attachment: options_cursor.diff
Description: text/plain (541 bytes)

pgsql-odbc by date

Next:From: Marko RistolaDate: 2005-06-25 07:35:01
Subject: Re: rollback to savepoint support
Previous:From: Jonathan FuerthDate: 2005-06-23 15:37:50
Subject: rollback to savepoint support

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group