PEPPLER.ORG
Michael Peppler
Sybase Consulting
Menu
Home
Sybase on Linux
Install Guide for Sybase on Linux
General Sybase Resources
General Perl Resources
Freeware
Sybperl
Sybase::Simple
DBD::Sybase
BCP Tool
Bug Tracker
Mailing List Archive
Downloads Directory
FAQs
Sybase on Linux FAQ
Sybperl FAQ
Personal
Michael Peppler's resume

sybperl-l Archive

Up    Prev    Next    

From: Michael Peppler <mpeppler at peppler dot org>
Subject: Re: DBD::Sybase datatype issue
Date: Apr 4 2008 2:48PM

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
mpeppler@peppler.org      -                  http://www.peppler.org
Sybase DBA/Developer      -   TeamSybase: http://www.teamsybase.com
Sybase on Linux FAQ       -   http://www.peppler.org/FAQ/linux.html