Tuesday, June 5, 2007

Executing a Query

To execute a query in ACCESS from outside access, one uses the following syntax

EXECUTE qurey_id;

I would recommend that actual command be as follows:

EXECUTE [query_id];

This will help avoid any problems that might arise because the ACCESS ID can be syntactically invalid for SQL.

Using EXECUTE is also how a SQL procedure is called.

The following is a link to an example of using EXECUTE and VB: : http://www.devcity.net/Articles/34/msaccess_sp2.aspx

No comments: