http://www.perlmonks.org?node_id=1105911

Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:

Do placeholders work in SET clause of UPDATE query for column datatype of UNSIGNED INT in ASE 15.7+?

After much time wasting I found -- with DBI 1.625, DBD::Sybase 1.14, & ASE 15.7 -- that ...

By way of crude, untested but representative code ...

# SQL. create table pqr ( x numeric(9,0) not null , y unsigned int not null ) insert into pqr values( 0 , 0 ) # Perl $n = 1; # Works. $dbh->do( q/UPDATE pqr SET x = ?/ , undef , $n ); $n = 2; # Fails; $dbh->do( q/UPDATE pqr SET y = ?/ , undef , $n ); $n = 3; # works (same as %s, this is all string in the end). $dbh->do( sprintf q/UPDATE pqr SET y = %d/ , $n );
  • Comment on DBI 1.625, DBD::Sybase 1.14, ASE 15.7: no placeholder support for UNSIGNED INT datatype in SET clause
  • Select or Download Code

Replies are listed 'Best First'.
Re: DBI 1.625, DBD::Sybase 1.14, ASE 15.7: no placeholder support for UNSIGNED INT datatype in SET clause
by mpeppler (Vicar) on Jan 20, 2015 at 16:35 UTC
    Congratulation - you have found a bug in DBD::Sybase.

    Placeholders do work, but not with UNSIGNED INT columns.

    I'll try to get that fixed in the next release of DBD::Sybase.

    Michael

      Is there a ticket for this yet? I didn't see anything obvious in RT.

      Thanks, Michael. (It may take some time before I personally would come across UNSIGNED INT datatype usage again.)

Re: DBI 1.625, DBD::Sybase 1.14, ASE 15.7: no placeholder support for UNSIGNED INT datatype in SET clause
by Anonymous Monk on Nov 03, 2014 at 15:13 UTC

    Could somebody please change "limited placeholder support" to "no placeholder support" in the OP title? Alternatively, could please remove the "for UNSIGNED INT datatype" part?