Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer
 
PerlMonks  

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

by Anonymous Monk
on Feb 01, 2004 at 20:31 UTC ( [id://325741]=note: print w/replies, xml ) Need Help??


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

From http://www.roth.net/perl/odbc/docs/ODBC_Docs.htm#RowCount_:
RowCount(); RowCount($Connection);

For UPDATE, INSERT, and DELETE statements the returned value is the number of rows affected by the request or -1 if the number of affected rows is not available.

Note: This function is not supported by all ODBC drivers! Some drivers do support this but not for all statements (eg. it is supported for UPDATE, INSERT and DELETE commands but not for the SELECT command).

Note: Many data sources cannot return the number of rows in a result set before fetching them; for maximum interoperability, applications should not rely on this behavior.

Returns:

Number of affected rows or -1 if not supported by driver in the current context.

  • Comment on Re: How to get number of rows updated in by an sql statement? (Win32::ODBC)
  • Download Code

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://325741]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others scrutinizing the Monastery: (7)
As of 2024-04-24 08:56 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found