Problem with DBD::Sybase using Sybase IQ

"Cumming, Joe" <[email protected]>
Newsgroups gmane.comp.lang.perl.modules.dbi.sybase
Message-ID <3F6DC98F71C43745919CC8705A555D2802B831C7@CIGEMAIL.chi.citadelgroup.com>
 

Hello,

 

I have a problem running execute() in DBD::Sybase when it has bind
parameters.

 

The following code

 

my $sqlstmt =<<'EOST';

INSERT INTO creditqr.Tenor (MartModifiedID, MartSnapDate, ShortName,
Tenor, TenorID)

VALUES (?,?,?,?,?);

EOST

 

my $stmt = $dbi->prepare($sqlstmt);

 

my @values = ('jc', "2005-02-28", "Test", 100, 500);

 

$stmt->execute(@values);

 

Produces the error:

 

DBD::Sybase::st execute failed: Server message number=21 severity=14
state=0 line=0 text=ASA Error -1000187: Unable to implicitly convert
column 'MartModifiedID' to datatype (varchar) from datatype (integer).

*       (db_sqlins.cxx 10136)  at dbitst.pl line 16.

 

 

However, the code

 

my $sqlstmt =<<'EOST';

INSERT INTO creditqr.Tenor (MartModifiedID, MartSnapDate, ShortName,
Tenor, TenorID)

VALUES = ('jc', "2005-02-28", "Test", 100, 500);

EOST

 

my $stmt = $dbi->prepare($sqlstmt);

 

$stmt->execute();

 

works fine.

 

 

Has anyone come across anything similar and know of a fix?

 

Thanks,

 

Joe
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.