Beefy Boxes and Bandwidth Generously Provided by pair Networks
laziness, impatience, and hubris
 
PerlMonks  

comment on

( #3333=superdoc: print w/replies, xml ) Need Help??
Hi Perl Monks,

I am using latest version of DBD::Sybase on SUN-OS-4.0
When using placeholders("?") to execute the queries in the DBI prepare statement and passing the values in the DBI execute statement, error messages are displayed.
for example:
DBI->trace(15); $sth= $dbh->prepare("update sample set name =? where sno = '123a'"); $sth->execute('example');

I have used DBI->trace(15), to trace the error.
DBI 1.51-nothread default trace level set to 0x0/15 (pid 18749)
sql is UPDATE EstWebquote set comments = ? where filename ='a'
prepare DISPATCH (DBI::db=HASH(0x2f7c24) rc1/1 @2 g0 ima2201 pid#1 +8749) at testsql.pl line 111 -> prepare for DBD::Sybase::db (DBI::db=HASH(0x2f7c24)~0x1e3e64 'UPDAT +E sample set name = ? where sno ='123a'') New DBI::st (for DBD::Sybase::st, parent=DBI::db=HASH(0x1e3e64), i +d=) dbih_setup_handle(DBI::st=HASH(0x1e4194)=>DBI::st=HASH(0x1e4134), +DBD::Sybase::st, 1e41a0, Null!) dbih_make_com(DBI::db=HASH(0x1e3e64), 3097e8, DBD::Sybase::st, 420 +, 0) thr#0 dbih_setup_attrib(DBI::st=HASH(0x1e4134), Err, DBI::db=HASH(0x1e3e +64)) SCALAR(0x283d40) (already defined) dbih_setup_attrib(DBI::st=HASH(0x1e4134), State, DBI::db=HASH(0x1e +3e64)) SCALAR(0x283da0) (already defined) dbih_setup_attrib(DBI::st=HASH(0x1e4134), Errstr, DBI::db=HASH(0x1 +e3e64)) SCALAR(0x283d70) (already defined) dbih_setup_attrib(DBI::st=HASH(0x1e4134), TraceLevel, DBI::db=HASH +(0x1e3e64)) 0 (already defined) dbih_setup_attrib(DBI::st=HASH(0x1e4134), FetchHashKeyName, DBI::d +b=HASH(0x1e3e64)) 'NAME' (already defined) dbih_setup_attrib(DBI::st=HASH(0x1e4134), HandleSetErr, <br>DBI::d +b=HASH(0x1e3e64)) undef (not defined) dbih_setup_attrib(DBI::st=HASH(0x1e4134), HandleError, <br>DBI::db +=HASH(0x1e3e64)) undef (not defined) syb_st_prepare() -> inUse = 0 dbd_preparse parameter :p1 () dbd_preparse scanned 1 distinct placeholders dyn_prepare: ct_dynamic(CS_PREPARE) for DBD1 syb_alloc_cmd() -> CS_COMMAND 30b3a0 for CS_CONNECTION 135260 ct_send(CS_DESCRIBE_INPUT) returned 0 at /usr/local/lib/perl5/site_per +l/5.8.7/sun4-solaris/DBD/Sybase.pm line 133. dyn_prepare: ct_dynamic(CS_DESCRIBE_INPUT) for DBD1 dyn_prepare: ct_results(CS_DESCRIBE_INPUT) for DBD1 - restype 4051 Segmentation Fault (core dumped)


Can anyone please help me how to resolve this?
Thanks,
Santhi

20060629 Janitored by Corion: Added more code tags, as per Writeup Formatting Tips

2006-06-30 Retitled by Arunbear
Original title: 'Problem with use of Palceholders(?) in the prepare statements for executing the queries of Sybase (DBD::Sybase)'


In reply to Placeholders(?) in the prepare statements for executing DBD::Sybase queries by santhi

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":



  • Are you posting in the right place? Check out Where do I post X? to know for sure.
  • Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
    <code> <a> <b> <big> <blockquote> <br /> <dd> <dl> <dt> <em> <font> <h1> <h2> <h3> <h4> <h5> <h6> <hr /> <i> <li> <nbsp> <ol> <p> <small> <strike> <strong> <sub> <sup> <table> <td> <th> <tr> <tt> <u> <ul>
  • Snippets of code should be wrapped in <code> tags not <pre> tags. In fact, <pre> tags should generally be avoided. If they must be used, extreme care should be taken to ensure that their contents do not have long lines (<70 chars), in order to prevent horizontal scrolling (and possible janitor intervention).
  • Want more info? How to link or How to display code and escape characters are good places to start.
Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others chilling in the Monastery: (4)
As of 2023-09-27 11:04 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?