Skip to Content.
Sympa Menu

freetds - Re: [freetds] Want to use fast forward cursors (SQL_CO_FFO) and MARS

freetds AT lists.ibiblio.org

Subject: FreeTDS Development Group

List archive

Chronological Thread  
  • From: Sebastien FLAESCH <sf AT 4js.com>
  • To: FreeTDS Development Group <freetds AT lists.ibiblio.org>
  • Subject: Re: [freetds] Want to use fast forward cursors (SQL_CO_FFO) and MARS
  • Date: Mon, 05 May 2008 10:59:27 +0200

Hi Frediano and thanks a lot for your answer...

About constants to be defined, since you don't provide any standard
ODBC headers in th freetds install dir, it's ok for me if you don't
provide a tdsodbc.h as well... I mean, I can grab the odbcss.h file
from a SQL Server distribution... (and you would use a odbcss.h copy
internally to compile the sources).

I would however expect to get both standard ODBC and MSSQL specific
headers in the include dir after installing FreeTDS...

FreeTDS comes with Sybase (TDS) headers (sqlfront.h, sybfront.h, etc)
so why don't you provide ODBC headers?

I guess you don't do this because the headers are usually provided
by the driver manager like UnixODBC...

But what if I don't want to use a driver manager? This is critical
in our case, when a lot of application servers have to be installed
= need to minimize deployment costs, and if we can avoid to install
UnixODBC, it's fine!

I would expect to have "default" ODBC headers in the FreeTDS sources,
that would be used for compilation and would be copied in the include
dir, if none of these options are provided to configure:

--with-iodbc
--with-unixodbc
--with-odbc-nodm

Does this make sense?

Cheers,
Seb


ZIGLIO, Frediano, VF-IT wrote:
Hi all,

I had a little review of our code and found a unique "FIXME" to resolve:

/* FIXME!
} else { / * Use fast forward cursor * /
r = SQLSetStmtAttr(st->stmtHandle, SQL_SOPT_SS_CURSOR_OPTIONS,
(SQLPOINTER) SQL_CO_FFO, SQL_IS_UINTEGER);
if (!SQL_SUCCEEDED(r)) {
DBGMSG(1, "Could not set SQL_SOPT_SS_CURSOR_OPTIONS");
return -1;
}
*/

With the native SQL Server ODBC drivers (SNAC and MDAC), this option
can be used from the odbcss.h header.

Are there any plans to support this?

BTW: What about MARS (Multiple Active Result Sets)?

Thanks a lot!
Seb

Currently there is no plan. However there are some things that we need
to address. ODBC has mainly ABI compatibility for constants. That is the
same constant has the same value on all platforms. Constants defined in
odbcss.h are not (correctly) in standard headers so we must define these
constants in some way. Where to define these constants? Should we create
a tdsodbcss.h header?? Or should we install it as odbcss.h?? Should we
install this header or not?? I think that these constant should be
defined when tdsodbc.h is included (this not means that these constants
have to be defined in tdsodbc.h!) so c source files won't change.

And back to fast forward cursors, when is it possible to set fast
cursors? Only after setting some types of cursors? Does setting fast
cursors can change cursor type? Setting fast forward cursors is just an
advise that is used only with some cursors type (that is you can set for
all cursor types but used only on some values) or setting with improper
cursor type give error/warning ?? And what happen if we try to move
cursor position on a read-only forward only cursor (this apply not only
to fast forward) ?? I think all these questions should we answered with
a test.

On fast forward implementation code should detect that we reached the
end of rows and set state to close and deallocated automatically. Also
odbc code should set some cursor types correctly in order to open fast
forward cursors instead of normal one.

freddy77
_______________________________________________
FreeTDS mailing list
FreeTDS AT lists.ibiblio.org
http://lists.ibiblio.org/mailman/listinfo/freetds






Archive powered by MHonArc 2.6.24.

Top of Page