I just download and installed the MyDAC 4.30.0.11 and when I issue a select statement that has results, RowsAffected is -1.
If I use RecNo or RecordCount the value is 1.
Is there a reason that RowsAffectect does not return the correct value of 1?
I also notice that when using DBMonitor or MySQLBuilder, it displays
a RowsAffected of 0 even when records are clearly displayed.
Using:
D7Pro
MySQL server version: 4.1.13-nt
MyDAC 4.30.0.11
Regards,
Scott.
RowsAffected returns -1 when data exists
-
Sendero Software
- Posts: 1
- Joined: Sun 02 Apr 2006 00:50
RowsAffected is used when you use delete/update statments, it will indicate the number of rows affected (Deleted,updated...). In case of a select statment this doesn't have sense, you will have the RecordCount for this purpose.
RowsAffected is also nice to use when you have to insert or update a object.. First try update, if rowsaffected is 0, then you know that row doesn't exist and can perform a insert.
RowsAffected is also nice to use when you have to insert or update a object.. First try update, if rowsaffected is 0, then you know that row doesn't exist and can perform a insert.