Re: As a generale rule - Query or VBA?



Hello People,

I agree with you Rick, I was recently working on a database that had
already been developed. It had a user-unfriendly GUI and over 400
queries, most of which he (the previous developer) had no idea what
they did and if they could have been gotten rid of. He used to create
a new query every time he wanted to look something up rather than look
up the old one, which when you are looking at a selection of over 400 I
can understand, but if he had used a proper naming convention he would
not be in that situation. But we are not talking about just having a
descent naming convention here we are talking about freeing the Db from
clutter and personaly I would go with code ever time.

Good luck

Nick

Rick Brandt wrote:
chris.nebinger@xxxxxxxxx wrote:
-->Should I code most of my action queries to tidy up the
clutter in the database window?

My answer is no. Instead, name them USYS_del_Entries_Before_a_date.

If your only intention is to declutter the database window, then this
method will hide them, only visible if you turn on system objects. If
the query is saved, then JET will save the fastest execution path. If
its in code, the JET engine first has to ensure it is valid SQL, then
determine the execution path, then execute it. Which sounds faster?
[snip]

I completely disagree. The speed difference is neglible and the
self-documenting nature of SQL executed in code is a HUGE advantage over a
stored query def. When looking at that query months later you will have to
search to find out where it is called (if at all), then research some more
to determine if a change will break some other part of the app that you
didn't remember also used the same query. SQL executed in code is self
explanatory and has an obvious scope.

I use saved querydefs only when I have to.

--
Rick Brandt, Microsoft Access MVP
Email (as appropriate) to...
RBrandt at Hunter dot com

.



Relevant Pages

  • Re: Query Data on a Form
    ... "Rick B" wrote: ... If you need to export it to another database with the address ... then Crete a query that will show the address for each record. ... the site name is found have the query auto populate the address data on ...
    (microsoft.public.access.forms)
  • Re: Query Help
    ... > objects in any database. ... that parcitular script is executed, I somehow tought that it shouln't put it ... Unless I misunderstand your tables and query, ... I have seen execution plans where the subquery gets ...
    (microsoft.public.sqlserver.programming)
  • Re: Query Data on a Form
    ... The Northwind database does this in the Orders form. ... customer from a drop-down list, and it takes the customer shipping data and ... "Rick B" wrote: ... then Crete a query that will show the address for each record. ...
    (microsoft.public.access.forms)
  • Re: remembering parameters
    ... I have two queries -- I pass the result of the SELECT query to a stored ... prepared statement on execution N is the thing returned by the select ... Since you are already using a database, I'd use the database to store ...
    (comp.lang.perl.misc)
  • Re: Table Field Auto Update?
    ... Export the data to your old databases from a query, ... build the concatenated field in a new column of your query, ... I would put all of this in ONE database and then let the various ... "Rick B" wrote: ...
    (microsoft.public.access.gettingstarted)