Re: DBD::Sybase datatype issue

Michael Peppler <[email protected]> Fri, 04 Apr 2008 16:48:40 +0200
Newsgroups gmane.comp.lang.perl.modules.dbi.sybase
Organization Peppler Consulting SaRL
Message-ID <[email protected]>
Sharif Islam wrote:

>   # run the stored proc
>   my $sp_qry = "EXEC Find_Changed_rows ?" ;
>   my $sth1 = $dbh->prepare($sp_qry) ;
>   $sth1->bind_param(1, $row[0],SQL_TIMESTAMP);
>   $sth1->execute($sp_qry);
> 
> When I run this:
> 
> DBD::Sybase::st execute failed: Server message number=257 severity=16 
> state=3 line=0 server=MYSERVER procedure=Find_Changed_rows text=Implicit 
> conversion from data type char to timestamp is not allowed. Use the 
> CONVERT function to run this query. at track_changes.pl line 35

SQL_TIMESTAMP is not the same as a T-SQL "timestamp" datatype.

Try using SQL_BINARY as the type to see if this works any better.

Michael
-- 
Michael Peppler           -                 Peppler Consulting SaRL
[email protected]      -                  http://www.peppler.org
Sybase DBA/Developer      -   TeamSybase: http://www.teamsybase.com
Sybase on Linux FAQ       -   http://www.peppler.org/FAQ/linux.html