DoCmd.RunSQL vs. Recordsets 
Author Message
 DoCmd.RunSQL vs. Recordsets

Just wondering... I used to do most operations from my Access client
involving even simple data updates on the SQL server backend with
recordsets. But somehow, RunSQL looks a lot easier in many situations. Is
there any guideline or 'best practice' when to use one and when the other?

Andrea



Wed, 28 Jul 2004 18:24:54 GMT  
 DoCmd.RunSQL vs. Recordsets
Try:

    CurrentDB.Execute (SQL statement as string)

Its faster than both docmd.runsql and recordsets.

Two tips:
(1) Your SQL table must have a primary key in order to update it via ODBC
(2) You must use the dbSeeChanges option in the Execute statement above.

Phil J
MCP


Quote:
> Just wondering... I used to do most operations from my Access client
> involving even simple data updates on the SQL server backend with
> recordsets. But somehow, RunSQL looks a lot easier in many situations. Is
> there any guideline or 'best practice' when to use one and when the other?

> Andrea



Thu, 29 Jul 2004 20:26:17 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. db.exexute vs. docmd.runsql

2. DoCmd.RunSQL

3. DoCmd.RunSQL Error

4. DoCmd.RunSQL error 2

5. docmd.RunSql problem

6. docmd.RunSQL String Concatenation

7. DoCmd.RunSQL too long record

8. DoCmd.RunSQL

9. suppress warnings on DoCmd.RunSQL ?

10. docmd.runsql repeat problem

11. docmd.runsql help required

12. docmd.runSQL fails on Windows 2000

 

 
Powered by phpBB® Forum Software