Steve Conklin (Developer@UltraDNT)
Developer at UltraDNT.com
Fri Oct 8 10:06:33 CDT 2004
After execution, check cmd.ActiveConnection.Errors.Count; if greater than 0, there were error(s). Of course, you should cmd.ActiveConnection.Errors.Clear just before execute, and don't use that connection for anything else, to be 100% sure it's your command that caused any error. Steve -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Garraway, Alun Sent: Friday, October 08, 2004 10: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