PDA

Click to See Complete Forum and Search --> : Where to keep queries


CoreyG
Nov 18th, 2000, 01:11 AM
Greets all,

I am developing a n-tier application (UI - Biz Rules - Data Source) using a mdb (Access/Jet) file as my data source. I am interested in storing queries EXTERNAL to the mdb file. That way I could update the queries at anytime by replacing 1 file. (Let's say I optimize some queries at a later date or...gasp...find a bug!)

I access all my ADO stuff through middle-tier code and not any ADO objects on UI forms.

Maybe I could have my queries in one mdb file with links to tables in the other. But then I would have to make sure all the links were restored/current when the application was run. Hmmm. Any ideas?

HaxSoft
Nov 18th, 2000, 04:51 AM
Why not store the queery (SQL Stat) as a plain txt file, e.g.


SELECT whatever FROM whatever WHERE whatever


and then open the recordset as follows:


Dim rs As Recordset
'whatever$ = the contents of your TXT file.

set rs = Db.OpenRecordset(whatever$)
'
' etc....
'


I really hope this mumbo jumbo makes any sense to ya!