in reply to Re: Getting identity after autoincr in FreeTDS/MSSQL/DBI
in thread Getting identity after autoincr in FreeTDS/MSSQL/DBI

Michael,

First, welcome! I didn't know you were here. Also, thanks for answering on the FreeTDS mailing list; I didn't think there was much overlap between here and there.

I ran with trace on and got the following results, which indicate to me that truncation is taking place somewhere. Time to spend the afternoon installing a newer version of FreeTDS.

-> fetchrow_hashref in DBD::_::st for DBD::Sybase::st (DBI::st=HAS +H(0x81d9a58)~0x81d99c8) 2 -> fetch for DBD::Sybase::st (DBI::st=HASH(0x81d99c8)~INNER) dbih_setup_fbav for 1 fields => 0x81d9b84 2 <- fetch= [ '2' ] row1 at test3.pl line 23 2 -> FETCH for DBD::Sybase::st (DBI::st=HASH(0x81d99c8)~INNER 'NAME' +) 2 <- FETCH= [ 'foo' ] at test3.pl line 23 <- fetchrow_hashref= HASH(0x80fd484)1keys row1 at test3.pl line 23 -> errstr in DBD::_::common for DBD::Sybase::st (DBI::st=HASH(0x81 +d9a58)~0x81d99c8) <- errstr= undef at test3.pl line 25
Thanks again,
Scott

Replies are listed 'Best First'.
Re: Re: Re: Getting identity after autoincr in FreeTDS/MSSQL/DBI
by mpeppler (Vicar) on Nov 10, 2001 at 00:28 UTC
    Yeah, the returned data is clearly getting truncated.

    I don't think that it's specific to the @@identity value - it's probably related to numeric data getting truncated by FreeTDS.

    Michael