Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation
 
PerlMonks  

Answer: How to get number of rows updated in by an sql statement? (Win32::ODBC)

( #51819=categorized answer: print w/ replies, xml ) Need Help??

Q&A > database programming > How to get number of rows updated in by an sql statement? (Win32::ODBC) contributed by jreades

The documentation for DBI is pretty good on this front.

It looks like:

$rows = $sth->rows;

... would return what you're looking for (unless the ODBC driver doesn't support this kind of method).

If the driver is very limited (I haven't worked with the Win32::ODBC driver) then you might have to fudge it a bit and try a clever SELECT statement based on the UPDATE if you really need to know how many rows were affected.

Comment on Answer: How to get number of rows updated in by an sql statement? (Win32::ODBC)
Download Code
Re: Answer: How can I get # of rows updated in a query when I use Win32::ODBC?
by 2501 (Pilgrim) on Jan 15, 2001 at 09:36 UTC
    that wasn't quite it. You can ignore me because I was suffering from a severe case of 24 hour blindness:P Your answer pointed me in the right direction (In the same documentation I thought I had looked through completely enough)

    none the less, I appreciate you took the time to answer my question despite my inadequate research:)

    All those here for the roshambo, please line up to the right....
Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others cooling their heels in the Monastery: (4)
As of 2014-12-21 20:24 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    Is guessing a good strategy for surviving in the IT business?





    Results (107 votes), past polls