SQL::Connection::AffectedRows()
Syntax
RowCount as N = <SQL::Connection>.AffectedRows()
|
Argument |
Description |
|
RowCount |
The number of affected rows. |
|
<SQL::Connection> |
Description
The AffectedRows() method returns the number of rows affected by the last SQL INSERT, DELETE, or UPDATE statement.
Supported By
Alpha Five Version 8 Enterprise Edition
Limitations
Desktop applications only.
Example
|
dim conn as SQL::Connection dim del as SQL::DeleteStatement dim sql_delete as C sql_delete = "DELETE FROM CustomerX WHERE substring(lastname,1,1) = 'J'" if .not. conn.open("{A5API=Access, FileName='C:\Program Files\A5V8\MDBFiles\Alphasports.mdb', UserName='Admin'}") then ui_msg_box("Error", conn.callresult.text) end end if conn.PortableSQLEnabled = .t. if .not. conn.execute(sql_delete) then ui_msg_box("Error", conn.callresult.text) end else ui_msg_box("Affected Rows", str(conn.AffectedRows())) end if conn.close() |
See Also