Log in

View Full Version : Solved: embedded sql statement



philfer
01-05-2010, 08:15 AM
Hello,

I have been reading about the advantages and disadvantages of using saved queries over "embedded sql statements" in terms of compilation and performance.

What do they mean when they say "embedded sql statements" when contrasting to saved queries???

Thanks
Phil

CreganTur
01-05-2010, 12:24 PM
I imagine they mean the difference between a true Query that is saved under the Queries tab of your database window, and a query string that is hard coded into your VBA and is run via DoCmd.RunSQL.

philfer
01-05-2010, 12:31 PM
Thanks CreganTur,

Do you know that for a fact or is that only a guess.

I read that Access compiles and creates an execution plan now for both embedded sql and saved queries. Would this be the case for SQL in VBA?

CreganTur
01-05-2010, 12:59 PM
Do you know that for a fact or is that only a guess.
It's an educated guess... I can't think that an "embedded sql statement" could be anything other than a hard coded sql statement.


I read that Access compiles and creates an execution plan now for both embedded sql and saved queries. Would this be the case for SQL in VBA?
If what you're referring to has anything to do with Access 2007, then I can't tell you because I don't have 2007. As a matter of opinion I am avoiding 2007 at all costs until work forces me to touch it... at which point I might stop all access development and work totally in Visual Studio. The Ribbon is a horrible, horrible design change and the intrusive security makes the job of an access dev. more difficult.