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: "Cumming, Joe" <Joe dot Cumming at citadelgroup dot com>
Subject: RE: Sybase IQ bind parameter problem
Date: Mar 27 2005 7:40PM

Hi Mike,

Here's the output of trace(5) as requested.

Joe

    DBI 1.41-ithread dispatch trace level set to 5 (in pid 6098)
    Note: perl is running without the recommended perl -w option
    -> DBI->connect(dbi:Sybase:server=IQDEV4;, creditQrRpt, ****)
    -> DBI->install_driver(Sybase) for linux perl=5.008003 pid=6098
ruid=4911 euid=4911
       install_driver: DBD::Sybase version 1.02 loaded from
/auto/tadev/tp/perl/5.8.3/lib/site_perl/5.8.3/i686-linux-thread-multi/DB
D/Sybase.pm
    New DBI::dr (for DBD::Sybase::dr, parent=, id=)
    dbih_setup_handle(DBI::dr=HASH(0x82a03a4)=>DBI::dr=HASH(0x834c908),
DBD::Sybase::dr, 0, Null!)
    dbih_make_com(Null!, 0, DBD::Sybase::dr, 84, 0) thr#8153008
    dbih_setup_attrib(DBI::dr=HASH(0x834c908), Err, Null!)
SCALAR(0x82343c8) (already defined)
    dbih_setup_attrib(DBI::dr=HASH(0x834c908), State, Null!)
SCALAR(0x8234410) (already defined)
    dbih_setup_attrib(DBI::dr=HASH(0x834c908), Errstr, Null!)
SCALAR(0x82343ec) (already defined)
    dbih_setup_attrib(DBI::dr=HASH(0x834c908), TraceLevel, Null!) 0
(already defined)
    dbih_setup_attrib(DBI::dr=HASH(0x834c908), FetchHashKeyName, Null!)
'NAME' (already defined)
    <- install_driver= DBI::dr=HASH(0x82a03a4)
    !! warn: 0 CLEARED by call to connect method
    -> connect for DBD::Sybase::dr (DBI::dr=HASH(0x82a03a4)~0x834c908
'server=IQDEV4;' 'creditQrRpt' **** HASH(0x834e080)) thr#8153008
    New DBI::db (for DBD::Sybase::db, parent=DBI::dr=HASH(0x834c908),
id=)
    dbih_setup_handle(DBI::db=HASH(0x834c8cc)=>DBI::db=HASH(0x834e0bc),
DBD::Sybase::db, 82a00f8, Null!)
    dbih_make_com(DBI::dr=HASH(0x834c908), 834d6c8, DBD::Sybase::db,
2024, 0) thr#8153008
    dbih_setup_attrib(DBI::db=HASH(0x834e0bc), Err,
DBI::dr=HASH(0x834c908)) SCALAR(0x82a6f50) (already defined)
    dbih_setup_attrib(DBI::db=HASH(0x834e0bc), State,
DBI::dr=HASH(0x834c908)) SCALAR(0x82a6fb0) (already defined)
    dbih_setup_attrib(DBI::db=HASH(0x834e0bc), Errstr,
DBI::dr=HASH(0x834c908)) SCALAR(0x82a6f80) (already defined)
    dbih_setup_attrib(DBI::db=HASH(0x834e0bc), TraceLevel,
DBI::dr=HASH(0x834c908)) 0 (already defined)
    dbih_setup_attrib(DBI::db=HASH(0x834e0bc), FetchHashKeyName,
DBI::dr=HASH(0x834c908)) 'NAME' (already defined)
    dbih_setup_attrib(DBI::db=HASH(0x834e0bc), HandleSetErr,
DBI::dr=HASH(0x834c908)) undef (not defined)
    dbih_setup_attrib(DBI::db=HASH(0x834e0bc), HandleError,
DBI::dr=HASH(0x834c908)) undef (not defined)
    syb_db_login() -> checking for chained transactions
    syb_db_login() -> chained transactions are  supported
    -> prepare for DBD::Sybase::db (DBI::db=HASH(0x834c8cc)~0x834e0bc
'select @@version') thr#8153008
    New DBI::st (for DBD::Sybase::st, parent=DBI::db=HASH(0x834e0bc),
id=)
    dbih_setup_handle(DBI::st=HASH(0x834e14c)=>DBI::st=HASH(0x834e134),
DBD::Sybase::st, 834e158, Null!)
    dbih_make_com(DBI::db=HASH(0x834e0bc), 834e358, DBD::Sybase::st,
396, 0) thr#8153008
    dbih_setup_attrib(DBI::st=HASH(0x834e134), Err,
DBI::db=HASH(0x834e0bc)) SCALAR(0x82a6f50) (already defined)
    dbih_setup_attrib(DBI::st=HASH(0x834e134), State,
DBI::db=HASH(0x834e0bc)) SCALAR(0x82a6fb0) (already defined)
    dbih_setup_attrib(DBI::st=HASH(0x834e134), Errstr,
DBI::db=HASH(0x834e0bc)) SCALAR(0x82a6f80) (already defined)
    dbih_setup_attrib(DBI::st=HASH(0x834e134), TraceLevel,
DBI::db=HASH(0x834e0bc)) 0 (already defined)
    dbih_setup_attrib(DBI::st=HASH(0x834e134), FetchHashKeyName,
DBI::db=HASH(0x834e0bc)) 'NAME' (already defined)
    dbih_setup_attrib(DBI::st=HASH(0x834e134), HandleSetErr,
DBI::db=HASH(0x834e0bc)) undef (not defined)
    dbih_setup_attrib(DBI::st=HASH(0x834e134), HandleError,
DBI::db=HASH(0x834e0bc)) undef (not defined)
    <- prepare= DBI::st=HASH(0x834e14c) at
/auto/tadev/tp/perl/5.8.3/lib/site_perl/5.8.3/i686-linux-thread-multi/DB
D/Sybase.pm line 91 via dbitst.pl line 8
    -> execute for DBD::Sybase::st (DBI::st=HASH(0x834e14c)~0x834e134)
thr#8153008
    syb_db_opentran() -> ct_command(
BEGIN TRAN DBI834e358
) = 1
    syb_db_opentran() -> ct_send() = 1
    syb_db_opentran() -> ct_results(4047) == 1
    syb_db_opentran() -> ct_results(4046) == 1
    syb_st_execute() -> ct_command() OK
    syb_st_execute() -> ct_send() OK
    st_next_result() -> ct_results(4040) == 1
    ct_res_info() returns 1 columns
    ct_describe(0): type = 0, maxlen = 128
    describe() -> col 0, type 0, realtype 0
describe() retcode = 1
    st_next_result() -> lasterr = 0, lastsev = 0
    <- execute= -1 at
/auto/tadev/tp/perl/5.8.3/lib/site_perl/5.8.3/i686-linux-thread-multi/DB
D/Sybase.pm line 92 via dbitst.pl line 8
    -> fetch for DBD::Sybase::st (DBI::st=HASH(0x834e14c)~0x834e134)
thr#8153008
    dbih_setup_fbav for 1 fields => 0x834e218
    <- fetch= [ 'Adaptive Server IQ/12.5.0/040202/P/ESD 8/RS6000MP/AIX
5.1.0/64bit/2004-02-02 13:20:59' ] row1 at
/auto/tadev/tp/perl/5.8.3/lib/site_perl/5.8.3/i686-linux-thread-multi/DB
D/Sybase.pm line 93 via dbitst.pl line 8
    <> DESTROY ignored for outer handle DBI::st=HASH(0x834e14c) (inner
DBI::st=HASH(0x834e134) has ref cnt 1)
    -> DESTROY for DBD::Sybase::st (DBI::st=HASH(0x834e134)~INNER)
thr#8153008
    syb_st_finish() -> ct_cancel(CS_CANCEL_ALL)
    syb_st_finish() -> resetting ACTIVE, moreResults, dyn_execed
    syb_st_destroy: called on 837d7e8...
    syb_st_destroy(): freeing imp_sth->statement
    syb_st_destroy(): cmd dropped: 1
    <- DESTROY= undef at
/auto/tadev/tp/perl/5.8.3/lib/site_perl/5.8.3/i686-linux-thread-multi/DB
I.pm line 591
    dbih_clearcom 0x834e14c (com 0x837d7e8, type 3) done.

    <- connect= DBI::db=HASH(0x834c8cc) at
/auto/tadev/tp/perl/5.8.3/lib/site_perl/5.8.3/i686-linux-thread-multi/DB
I.pm line 591
    -> STORE for DBD::Sybase::db (DBI::db=HASH(0x834e0bc)~INNER
'PrintError' 1) thr#8153008
    STORE DBI::db=HASH(0x834e0bc) 'PrintError' => 1
    <- STORE= 1 at
/auto/tadev/tp/perl/5.8.3/lib/site_perl/5.8.3/i686-linux-thread-multi/DB
I.pm line 635
    -> STORE for DBD::Sybase::db (DBI::db=HASH(0x834e0bc)~INNER
'AutoCommit' 1) thr#8153008
    syb_db_commit() -> ct_command(
COMMIT TRAN DBI834e358
)
    syb_db_commit() -> ct_send() OK
    syb_db_commit() -> ct_results(4047) == 1
    syb_db_commit() -> ct_results(4046) == 1
    <- STORE= 1 at
/auto/tadev/tp/perl/5.8.3/lib/site_perl/5.8.3/i686-linux-thread-multi/DB
I.pm line 635
    -> STORE for DBD::Sybase::db (DBI::db=HASH(0x834e0bc)~INNER
'Username' 'creditQrRpt') thr#8153008
    STORE DBI::db=HASH(0x834e0bc) 'Username' => 'creditQrRpt'
    <- STORE= 1 at
/auto/tadev/tp/perl/5.8.3/lib/site_perl/5.8.3/i686-linux-thread-multi/DB
I.pm line 638 via dbitst.pl line 8
    <- FETCH= 'creditQrRpt' ('Username' from cache) at
/auto/tadev/tp/perl/5.8.3/lib/site_perl/5.8.3/i686-linux-thread-multi/DB
I.pm line 638
    <- connect= DBI::db=HASH(0x834c8cc)
    -> STORE for DBD::Sybase::db (DBI::db=HASH(0x834e0bc)~INNER
'dbi_connect_closure' CODE(0x834c818)) thr#8153008
    STORE DBI::db=HASH(0x834e0bc) 'dbi_connect_closure' =>
CODE(0x834c818)
    <- STORE= 1 at
/auto/tadev/tp/perl/5.8.3/lib/site_perl/5.8.3/i686-linux-thread-multi/DB
I.pm line 652 via dbitst.pl line 8
    -> prepare for DBD::Sybase::db (DBI::db=HASH(0x834c8cc)~0x834e0bc '
UPDATE creditqr.VolCurveDef SET QuoteType = ? WHERE VolCurveDefID = ? ')
thr#8153008
    New DBI::st (for DBD::Sybase::st, parent=DBI::db=HASH(0x834e0bc),
id=)
    dbih_setup_handle(DBI::st=HASH(0x834e1dc)=>DBI::st=HASH(0x8153d08),
DBD::Sybase::st, 834e1e8, Null!)
    dbih_make_com(DBI::db=HASH(0x834e0bc), 834e358, DBD::Sybase::st,
396, 0) thr#8153008
    dbih_setup_attrib(DBI::st=HASH(0x8153d08), Err,
DBI::db=HASH(0x834e0bc)) SCALAR(0x82a6f50) (already defined)
    dbih_setup_attrib(DBI::st=HASH(0x8153d08), State,
DBI::db=HASH(0x834e0bc)) SCALAR(0x82a6fb0) (already defined)
    dbih_setup_attrib(DBI::st=HASH(0x8153d08), Errstr,
DBI::db=HASH(0x834e0bc)) SCALAR(0x82a6f80) (already defined)
    dbih_setup_attrib(DBI::st=HASH(0x8153d08), TraceLevel,
DBI::db=HASH(0x834e0bc)) 0 (already defined)
    dbih_setup_attrib(DBI::st=HASH(0x8153d08), FetchHashKeyName,
DBI::db=HASH(0x834e0bc)) 'NAME' (already defined)
    dbih_setup_attrib(DBI::st=HASH(0x8153d08), HandleSetErr,
DBI::db=HASH(0x834e0bc)) undef (not defined)
    dbih_setup_attrib(DBI::st=HASH(0x8153d08), HandleError,
DBI::db=HASH(0x834e0bc)) undef (not defined)
    dbd_preparse parameter :p1 ()
    dbd_preparse parameter :p2 ()
    dbd_preparse scanned 2 distinct placeholders
    syb_st_prepare: ct_dynamic(CS_PREPARE) for DBD_1
    syb_st_prepare: ct_dynamic(CS_DESCRIBE_INPUT) for DBD_1
    syb_st_prepare: ct_results(CS_DESCRIBE_INPUT) for DBD_1 - restype
4051
    syb_st_prepare: ct_res_info(CS_DESCRIBE_INPUT) statement has 2
parameters
    syb_st_prepare: ct_describe(CS_DESCRIBE_INPUT) col 1, type 8, status
256, length 4
    syb_st_prepare: ct_describe(CS_DESCRIBE_INPUT) col 2, type 8, status
256, length 4
    syb_st_prepare: ct_results(CS_DESCRIBE_INPUT) for DBD_1 - restype
4046
    <- prepare= DBI::st=HASH(0x834e1dc) at dbitst.pl line 13
    -> bind_param for DBD::Sybase::st (DBI::st=HASH(0x834e1dc)~0x8153d08
1 'CIG_SNAP' 12) thr#8153008 bind :p1 <== 'CIG_SNAP' (attribs: )
       bind :p1 () <== 'CIG_SNAP' (size 8/9/0, ptype 4, otype 0)
       bind :p1 <== 'CIG_SNAP' (size 8, ok 1)
       datafmt: type=8, status=256, len=4
       saved type: 8
    <- bind_param= 1 at dbitst.pl line 16 via dbitst.pl line 15
    -> bind_param for DBD::Sybase::st (DBI::st=HASH(0x834e1dc)~0x8153d08
2 2672444) thr#8153008 bind :p2 <== '2672444' (attribs: )
       bind :p2 () <== 2672444 (size 7/8/0, ptype 5, otype 0)
       bind :p2 <== '2672444' (size 7, ok 1)
       datafmt: type=8, status=256, len=4
       saved type: 8
    <- bind_param= 1 at dbitst.pl line 17 via dbitst.pl line 15
    -> execute for DBD::Sybase::st (DBI::st=HASH(0x834e1dc)~0x8153d08)
thr#8153008
    syb_st_execute() -> ct_send() OK
    st_next_result() -> ct_results(4048) == 1
    st_next_result() -> ct_results(4046) == 1
ct_results(4046) final retcode = -205
    st_next_result() -> lasterr = 21, lastsev = 14
    st_next_result() -> restype is not data result or
syb_cancel_request_on_error is TRUE, force failFlag
    st_next_result() -> failFlag set - clear request
    syb_st_finish() -> ct_cancel(CS_CANCEL_ALL)
    syb_st_finish() -> resetting ACTIVE, moreResults, dyn_execed
    syb_st_execute() -> got CS_CMD_FAIL: resetting ACTIVE, moreResults,
dyn_execed
    !! ERROR: 21 '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). 
-- (db_sqlins.cxx 10136) '
    <- execute= undef at dbitst.pl line 18 via dbitst.pl line 15
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). 
-- (db_sqlins.cxx 10136)  at dbitst.pl line 18.
    <> DESTROY ignored for outer handle DBI::st=HASH(0x834e1dc) (inner
DBI::st=HASH(0x8153d08) has ref cnt 1)
    -> DESTROY for DBD::Sybase::st (DBI::st=HASH(0x8153d08)~INNER)
thr#8153008
    syb_st_destroy: called on 837d7e8...
    syb_st_destroy: ct_dynamic(CS_DEALLOC) for DBD_1
    syb_st_destroy(): freeing imp_sth->statement
    syb_st_destroy(): cmd dropped: 1
       ERROR: 21 '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). 
-- (db_sqlins.cxx 10136) '
    <- DESTROY= undef
    dbih_clearcom 0x834e1dc (com 0x837d7e8, type 3) done.

    <> DESTROY ignored for outer handle DBI::db=HASH(0x834c8cc) (inner
DBI::db=HASH(0x834e0bc) has ref cnt 1)
    -> DESTROY for DBD::Sybase::db (DBI::db=HASH(0x834e0bc)~INNER)
thr#8153008
    syb_db_disconnect() -> ct_close()
       ERROR: 21 '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). 
-- (db_sqlins.cxx 10136) '
    <- DESTROY= undef
    dbih_clearcom 0x834c8cc (com 0x834e358, type 2) done.

    -- DBI::END
    !! ERROR: 21 CLEARED by call to disconnect_all method
    -> disconnect_all for DBD::Sybase::dr
(DBI::dr=HASH(0x82a03a4)~0x834c908) thr#8153008
    <- disconnect_all= 1 at
/auto/tadev/tp/perl/5.8.3/lib/site_perl/5.8.3/i686-linux-thread-multi/DB
I.pm line 661 via dbitst.pl line 0
!   -> DESTROY for DBD::Sybase::dr (DBI::dr=HASH(0x834c908)~INNER)
thr#8153008
!   <- DESTROY= (not implemented) during global destruction
    dbih_clearcom 0x82a03a4 (com 0x834d6c8, type 1) done.

!   <> DESTROY for DBI::dr=HASH(0x82a03a4) ignored (inner handle gone)


-----Original Message-----
From: owner-sybperl-l@peppler.org [mailto:owner-sybperl-l@peppler.org]
On Behalf Of Michael Peppler
Sent: 27 March 2005 17:07
To: sybperl-l@peppler.org
Subject: Re: Sybase IQ bind parameter problem

On Thu, 2005-03-24 at 12:18, Cumming, Joe wrote:
>  
> 
> 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.

> my $sqlstmt =" UPDATE creditqr.VolCurveDef SET QuoteType = ? WHERE
> VolCurveDefID = ? ";


> 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).

Interesting. I seem to remember running "make test" for DBD::Sybase
against IQ and it worked fine (meaning that placeholders worked...)

Could you try to run that with DBI->trace(5) ?

Thanks,

Michael
-- 
Michael Peppler  -  mpeppler@peppler.org  -  http://www.peppler.org/
Sybase DBA/Developer
Sybase on Linux FAQ: http://www.peppler.org/FAQ/linux.html






---------------------------------------------------------------------------------------------

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