Hi Connie
I would usually execute an INSERT statement for adding a single record, but
would use rst.AddNew when adding multiple records in a loop. I haven't done
definitive testing, but my gut feeling is that the overhead of opening a
Recordset is greater that a SQL insert, but that the advantage is reversed
for multiple records.
I would also use a Recordset for a single record involving a large number of
fields, because the construction of a SQL statement can get pretty messy.
Best wishes,
Graham
> From: MS_Access_Professionals@yahoogroups.com
[mailto:MS_Access_Professionals@yahoogroups.com] On Behalf Of mrsgoudge
> Sent: Wednesday, 26 October 2011 07:11
> To: MS_Access_Professionals@yahoogroups.com
> Subject: [MS_AccessPros] rst.AddNew vs. sql Insert Into statement
>
>
> John,
> In inserting new records do you recommend one way over the other? I don't
want something screwy like this happening again.
>
> thanks!
> Connie
Selasa, 25 Oktober 2011
RE: [MS_AccessPros] rst.AddNew vs. sql Insert Into statement
__._,_.___
MARKETPLACE
.
__,_._,___
Langganan:
Posting Komentar (Atom)
Tidak ada komentar:
Posting Komentar