DWUTKA at marlow.com
DWUTKA at marlow.com
Fri Oct 8 09:57:25 CDT 2004
Dim intRecordsAffected As Long strSQL = "INSERT INTO table1(1, 2, 3) " & _ "SELECT A1, A2, A3 " & _ "FROM table " & _ "WHERE Something = Something" command.CommandText = strSQL command.Execute intRecordsAffected When run, intRecordsAffected will have the number of records affected by the command text. Drew -----Original Message----- From: Garraway, Alun [mailto:Alun.Garraway at otto.de] Sent: Friday, October 08, 2004 9:33 AM To: Access Developers discussion and problem solving Subject: [AccessD] check if ADO command was successful? Hi, is it possible to check if a ADODB.Command was successful, IOW when I have following code: strSQL = INSERT INTO table1(1, 2, 3) SELECT A1, A2, A3 FROM table WHERE Something = Something command.CommandText = strSQL command.Execute how can I know (check) if a record has been added? have a nice weekend :-) alun -- _______________________________________________ AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com