Skip to Content.
Sympa Menu

freetds - [freetds] Is MS SQL Server closes cursor on every commit/rollback?

freetds AT lists.ibiblio.org

Subject: FreeTDS Development Group

List archive

Chronological Thread  
  • From: ikorot AT earthlink.net
  • To: 'FreeTDS Development Group' <freetds AT lists.ibiblio.org>
  • Subject: [freetds] Is MS SQL Server closes cursor on every commit/rollback?
  • Date: Sun, 25 Oct 2009 04:08:14 -0400 (EDT)

Hi, ALL,
I am trying to develop a program that will
use an ODBC connection to different DB.
It will be based on some other C++ library.

What I found is that the comment to the ODBC interface
for this library says following:

// By default, MS Sql Server closes cursors on commit and rollback. The
following
// call to SQLSetConnectOption() is needed to force SQL Server to preserve
cursors
// after a transaction. This is a driver specific option and is not part of
the
// ODBC standard. Note: this behavior is specific to the ODBC interface to
SQL Server.
// The database settings don't have any effect one way or the other.
const long SQL_PRESERVE_CURSORS = 1204L;
const long SQL_PC_ON = 1L;
/* retcode = */ SQLSetConnectOption(hdbc, SQL_PRESERVE_CURSORS, SQL_PC_ON);

Is this true for all version of MS SQL Server or just for an old ones?
Is it the same for Sybase as well?

What I will gain/lose when this will be disabled?

Thank you.





Archive powered by MHonArc 2.6.24.

Top of Page