Michael,
I installed DBD-Sybase-0.22, and I still have the same problem. I assume
that the 0.22 code would have the bux fix since it was timestamped
properly, and I looked at dbdimp.c and it looks to be correct now.
Stacey Mader, I tried your example with the do method, and it returns -1
as well.
Must a problem with the underlying code.
Michael/Stacey, thanks for trying.
Any more suggestions?
On Wed, 27 Mar 2002, Michael Peppler wrote:
> 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
>