Skip to Content.
Sympa Menu

freetds - [freetds] PATCH: fix row counts with ODBC prepared statements.

freetds AT lists.ibiblio.org

Subject: FreeTDS Development Group

List archive

Chronological Thread  
  • From: Alex Hornby <alex AT anvil.com>
  • To: FreeTDS Development Group <freetds AT lists.ibiblio.org>
  • Cc: freeodbc++ AT orcane.net
  • Subject: [freetds] PATCH: fix row counts with ODBC prepared statements.
  • Date: Wed, 05 Nov 2003 14:39:00 +0000

Hi,

Here's a patch that fixes the row count behaviour of FreeTDS ODBC prepared statements. This fix has got the ODBC driver working with the libodbc++ isql++ command line tool.

Cheers,
Alex.

Index: odbc.c
===================================================================
RCS file: /cvsroot/freetds/freetds/src/odbc/odbc.c,v
retrieving revision 1.261
diff -u -r1.261 odbc.c
--- odbc.c 4 Nov 2003 19:01:46 -0000 1.261
+++ odbc.c 5 Nov 2003 14:35:25 -0000
@@ -2551,7 +2551,7 @@
*drec->sql_desc_octet_length_ptr = len;
}
if (stmt->ird->header.sql_desc_rows_processed_ptr) {
- ++(*(stmt->ird->header.sql_desc_rows_processed_ptr));
+ *(stmt->ird->header.sql_desc_rows_processed_ptr) = 1;
tdsdump_log(TDS_DBG_INFO1, "Got row (%d)\n", (int)
*(stmt->ird->header.sql_desc_rows_processed_ptr));
}
if (stmt->ird->header.sql_desc_array_status_ptr)






  • [freetds] PATCH: fix row counts with ODBC prepared statements., Alex Hornby, 11/05/2003

Archive powered by MHonArc 2.6.24.

Top of Page