|
|
sybperl-l Archive
Up Prev Next
From: "Cumming, Joe" <Joe dot Cumming at citadelgroup dot com>
Subject: Sybase IQ bind parameter problem
Date: Mar 24 2005 11:18AM
Hello,
I am unable to use bind parameters in a simple query using Sybase IQ
when the column being bound to is not an integer.
The following code
my $sqlstmt =" UPDATE creditqr.VolCurveDef SET QuoteType = ? WHERE
VolCurveDefID = ? ";
my $sth = $dbi->prepare($sqlstmt);
eval {
$sth->bind_param( 1, 'SNAP', SQL_VARCHAR);
$sth->bind_param( 2, 2672444, SQL_INTEGER);
$sth->execute();
};
if ($@) {
print $@;
}
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 'QuoteType' to datatype (varchar) from datatype (integer).
If I bind to just integer values however the db is quite happy.
Has anyone come across anything similar and know of a fix?
Thanks,
Joe
------------------------------------------------------------------------
---------------------
The information contained in this transmission and any attached
documents is privileged, confidential and intended only for the use of
the individual or entity named above. If the reader of this message is
not the intended recipient, you are hereby directed not to read the
contents of this transmission, and are hereby notified that any
disclosure, copying, distribution, dissemination or use of the contents
of this transmission, including any attachments, or the taking of any
action in reliance thereon, is strictly prohibited. If you have received
this communication in error, please notify the sender and/or Citadel
Investment Group (Europe) Ltd immediately by telephone at +44 (0) 20
7645 9700 and destroy any copy of this transmission.
Citadel Investment Group (Europe) Ltd is authorised and regulated by the
Financial Services Authority (FSA Firm Ref No 190260).
Registered in England. Registration No. 3666898.
Registered Office: 10th Floor, 2 George Yard, Lombard Street, London
EC3V 9DH
|