freetds AT lists.ibiblio.org
Subject: FreeTDS Development Group
List archive
- From: "James K. Lowden" <jklowden AT freetds.org>
- To: FreeTDS Development Group <freetds AT lists.ibiblio.org>
- Subject: Re: [freetds] affected rows
- Date: Mon, 12 Feb 2007 23:43:31 -0500
kris AT bobbl.be wrote:
> I mean for update queries, forgot to mention that :)
> Selects and sp's work just fine.
>
> It is usefull to know how much changes have been made to the database.
Indeed. Please see the code for dbcount() in src/dblib/dblib.c. I think
that does what you want.
The usual warning about using libtds applies, of course. I always
recommend people use db-lib instead.
> > I am trying to retrieve the affected rowcount from an mssql2k server
> > with freetds, how is that done with the latest version ?
> >
> > I manage to get resultsets, recordsets and rows from select
> > statements.
> >
> > Here is what I do :
> > while ((rc = tds_process_tokens(pSocket, &res_type, &done_flags,
> > TDS_TOKEN_RESULTS|TDS_RETURN_ROWFMT|TDS_RETURN_COMPUTEFMT|TDS_RETURN_
> > DONE|TDS_STOPAT_ROW|TDS_STOPAT_COMPUTE|TDS_RETURN_PROC))
> > == TDS_SUCCEED) {
> > printf("%i\n", res_type);
> > printf("%p\n", pSocket->res_info);
> >
> > but it always returns pSocket->res_info nil, what am i missing ?
HTH.
--jkl
-
[freetds] affected rows,
kris, 02/12/2007
-
Re: [freetds] affected rows,
kris, 02/12/2007
- Re: [freetds] affected rows, James K. Lowden, 02/12/2007
-
Re: [freetds] affected rows,
kris, 02/12/2007
Archive powered by MHonArc 2.6.24.