[freetds] affected rows

kris at bobbl.be kris at bobbl.be
Mon Feb 12 15:31:27 EST 2007


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.

Kris

> Hi,
>
> 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 ?
>
> Thanks,
>
> Kris
>
>
> _______________________________________________
> FreeTDS mailing list
> FreeTDS at lists.ibiblio.org
> http://lists.ibiblio.org/mailman/listinfo/freetds
>




More information about the FreeTDS mailing list