Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked
 
PerlMonks  

comment on

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

apparently I was very wrong... any problems I had previously were simply a result of my own insuffiencies. I had always assumed this to be the case, but I mentioned my problems because the only solution I came to when I couldn't get placeholders to work was to take them out and thought the original poster might come to a similar place.

The problems I was referring to were with using DBI and the ODBC DBD to perform UPDATE statements on MS Access DBs using placeholders. I just wrote up a test statement, though, and had no problems. Sorry to pass bogus information, perhaps this code can help the original poster anyway...

my @updates = map {$dbh->quote_identifier($_) . ' = (?)'} ('call 1 com +ment', 'call 2 comment', 'call 3 comment', 'call 4 comment'); my $name_field = $dbh->quote_identifier('last name'); my $update_string = join ", ", @updates; my $sql = qq{UPDATE $table SET $update_string WHERE $name_field = (?)} +; print "$sql\n"; my $sth = $dbh->prepare_cached($sql); $sth->execute('foo','bar','baz','qux','smith');

I was thoroughly wrong, but maybe the code will end up helping where my previous post couldn't :)
--au


In reply to Re: Re: Re: DBI execute() args in array format (or similar) possible? by aufrank
in thread DBI execute() args in array format (or similar) possible? by snafu

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 surveying the Monastery: (3)
As of 2023-01-31 00:59 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?