Jason Ostrom writes:
 > I'm using DBI::Sybase to connect to a MS-SQL server, and simply struggling 
 > with how to find out how many rows were actually updated on a UPDATE, but 
 > the rows method and the return value of execute both return -1.

Someone recently pointed out that I had a slight error in my handling
of result types. Try this patch to dbdimp.c

Index: dbdimp.c
===================================================================
RCS file: /usr/local/cvsroot/DBD-Sybase/dbdimp.c,v
retrieving revision 1.31
diff -c -r1.31 dbdimp.c
*** dbdimp.c    23 Jan 2002 00:10:48 -0000      1.31
--- dbdimp.c    21 Mar 2002 17:12:36 -0000
***************
*** 2228,2234 ****
  
        if(restype == CS_CMD_FAIL)
            failFlag = 1;
!       if(restype == CS_CMD_DONE && !failFlag) {
            ct_res_info(cmd, CS_ROW_COUNT, &imp_sth->numRows, CS_UNUSED, NULL);
        }
        switch(restype) 
--- 2228,2236 ----
  
        if(restype == CS_CMD_FAIL)
            failFlag = 1;
!       if((restype == CS_CMD_DONE || restype == CS_CMD_SUCCEED) 
!          && !failFlag) 
!       {
            ct_res_info(cmd, CS_ROW_COUNT, &imp_sth->numRows, CS_UNUSED, NULL);
        }
        switch(restype) 


Michael
-- 
Michael Peppler                              Data Migrations, Inc.
[EMAIL PROTECTED]           *or*          [EMAIL PROTECTED]
http://www.mbay.net/~mpeppler
International Sybase User Group: http://www.isug.com

Reply via email to