Steve Conklin (Developer@UltraDNT)
Developer at UltraDNT.com
Fri Oct 8 11:07:06 CDT 2004
Guess I'm not cool, but my method works too -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of DWUTKA at marlow.com Sent: Friday, October 08, 2004 11:41 AM To: accessd at databaseadvisors.com Subject: RE: [AccessD] check if ADO command was successful? You're quite welcome. Glad to help. As an FYI, that same method can be used with a connection object's Execute method. (I actually had to look it up, to make sure it was there for the Command object) Drew -----Original Message----- From: Garraway, Alun [mailto:Alun.Garraway at otto.de] Sent: Friday, October 08, 2004 10:09 AM To: Access Developers discussion and problem solving Subject: RE: [AccessD] check if ADO command was successful? COOL! thanks Drew works like a charm :-) -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com]On Behalf Of DWUTKA at marlow.com Sent: Friday, October 08, 2004 4:57 PM To: accessd at databaseadvisors.com Subject: RE: [AccessD] check if ADO command was successful? 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 -- _______________________________________________ AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com -- _______________________________________________ AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com -- _______________________________________________ AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com