freetds AT lists.ibiblio.org
Subject: FreeTDS Development Group
List archive
- From: ZIGLIO Frediano <Frediano.Ziglio AT vodafoneomnitel.it>
- To: "'FreeTDS Development Group'" <freetds AT lists.ibiblio.org>
- Subject: RE: [freetds] SQLRowCount
- Date: Mon, 31 Mar 2003 11:13:16 +0200
>
> This should be about right for SQLRowCount..
>
> RowCount is normally the number of rows effected by update ops.
> The odbc documentation mentions if rowcount is not avaliable
> you should
> return -1.
>
> With the driver rowcounts for SELECTs are not avaliable until
> after you've
> downloaded all rows from the database. Set -1 initially so those who
> check for a count initially won't be confused.
>
> Have Fun!
> Peter
>
> SQLRowCount(SQLHSTMT hstmt, SQLINTEGER FAR * pcrow)
> ...
>
> tds = stmt->hdbc->tds_socket;
> if (tds->rows_affected == TDS_NO_COUNT)
> {
> if (tds->res_info != NULL)
> {
> if (tds->res_info->row_count == 0)
> *pcrow = -1;
> else
> *pcrow = tds->res_info->row_count;
> }
> else
> *pcrow = -1;
> }
> else
> *pcrow = tds->rows_affected;
> return SQL_SUCCESS;
>
Applied.
As usual a good patch, thanks Peter
freddy77
=================================
"STRICTLY PERSONAL AND CONFIDENTIAL
This message may contain confidential and proprietary material for the sole
use of the intended recipient. Any review or distribution by others is
strictly prohibited. If you are not the intended recipient please contact
the sender and delete all copies.
The contents of this message that do not relate to the official business of
our company shall be understood as neither given nor endorsed by it."
=================================
-
[freetds] SQLRowCount,
Peter Deacon, 03/30/2003
- <Possible follow-up(s)>
- RE: [freetds] SQLRowCount, ZIGLIO Frediano, 03/31/2003
Archive powered by MHonArc 2.6.24.