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)

by jreades (Friar)
on Jan 15, 2001 at 02:56 UTC ( #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) - Answer 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
Replies are listed 'Best First'.
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 all is quiet...

How do I use this? | Other CB clients
Other Users?
Others imbibing at the Monastery: (9)
As of 2016-12-05 17:45 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    On a regular basis, I'm most likely to spy upon:













    Results (89 votes). Check out past polls.