directormac
Occasional Presence
- Local time
- Today, 04:24
- Joined
- Oct 24, 2001
- Messages
- 259
Dear Assorted Access Gods:
I'm (maddeningly) slowly working on my first split FE/BE project. This will be a distributed .mde FE that hooks to an Access BE stored on a web server (via, I THINK, providing the FE with linked tables that point at the server--but I haven't gotten around to splitting the thing yet).
I know that I should base all forms & reports on queries, rather than the actual tables. No problem there. However, I have a lot of VBA code to generate all sorts of reports, export Word docs, send e-mails, etc. Most of these start from a selected record--a booking, in this case. Some use that selected record to look up various bits of info in related tables (venues, contacts, performance dates & times, etc.) to work their mojo.
Now I already know that I should avoid DLookup(), since the number of records and concurrent users will (someday) be moderately high--given Pat H.'s many firm opinions on the matter, I try to avoid DLookup anyway()! Likewise, I know Pat's penchant for stored QueryDef's. My own proclivity, however, has usually run towards building an SQL statement within VBA and using that as the condition on my .Open method. However, Pat's continuing argument that stored queries are more efficient because they do much of their work when compiled, rather than at call time, is persuasive.
So, here's my question (at last!) to my betters: What is the "best" method for retreiving one or a small set of records from one or more tables in a multi-user FE/BE setup? I want to factor in speed, efficiency, record-locking issues, and ease of coding (also, I try to avoid DAO whenever possible, on the grounds that ADO is "the future" - HA)
Some methods I'm using now:
Any comments, ideas, examples, what have you, VERY welcome!
--Curious Mac
I'm (maddeningly) slowly working on my first split FE/BE project. This will be a distributed .mde FE that hooks to an Access BE stored on a web server (via, I THINK, providing the FE with linked tables that point at the server--but I haven't gotten around to splitting the thing yet).
I know that I should base all forms & reports on queries, rather than the actual tables. No problem there. However, I have a lot of VBA code to generate all sorts of reports, export Word docs, send e-mails, etc. Most of these start from a selected record--a booking, in this case. Some use that selected record to look up various bits of info in related tables (venues, contacts, performance dates & times, etc.) to work their mojo.
Now I already know that I should avoid DLookup(), since the number of records and concurrent users will (someday) be moderately high--given Pat H.'s many firm opinions on the matter, I try to avoid DLookup anyway()! Likewise, I know Pat's penchant for stored QueryDef's. My own proclivity, however, has usually run towards building an SQL statement within VBA and using that as the condition on my .Open method. However, Pat's continuing argument that stored queries are more efficient because they do much of their work when compiled, rather than at call time, is persuasive.
So, here's my question (at last!) to my betters: What is the "best" method for retreiving one or a small set of records from one or more tables in a multi-user FE/BE setup? I want to factor in speed, efficiency, record-locking issues, and ease of coding (also, I try to avoid DAO whenever possible, on the grounds that ADO is "the future" - HA)
Some methods I'm using now:
- Saved queries where the conditions get all their values from (hidden or not) forms.
- Built-from-scratch SQL WHERE clauses applied to .Open method.
- A "temp table" - when the user selects record "X" for the above described ministrations, a VBA function uses multiple SQL WHERE'D recordsets to gather info from all the various tables, then writes it all as the single record in my temp table. The ministrations then work off that single record and delete it after. In the FE/BE environment, this temp table would be one of only two "local" tables not stored on the server.
- Saved Paramter queries where values are supplied from opening call.
- Hidden form based on a long chain of saved queries to get the individual pieces of info in one place (then VBA ministrations pull their data from there).
- QBF techniques.
- Saved queries which then have filters applied (example: save query returns all the venues, filter then narrows it to venue related to selected booking).
Any comments, ideas, examples, what have you, VERY welcome!
--Curious Mac