[AccessD] check if ADO command was successful?

Garraway, Alun Alun.Garraway at otto.de
Fri Oct 8 10:09:20 CDT 2004


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



More information about the AccessD mailing list