May 09, 2005 03:18 PM|adefwebserver|LINK
I am trying my approach on Access starting today, and I'll post the results. This should work with the current mySQL data provider, too.
My idea for my "hack" was to simply make a provider for Access that would receive a request like:
Now in SQL this would probably call a stored procedure that would look in one table and if it didn't find what it was looking for then look in another table. This is of course impossible in Microsoft Access.
What we do with the current DAL is that since *I* (the module developer) has to make the "AcessProvider" I simply write the multiple calls to the database.
So my idea is that the "AccessProvider" using the new DALII would be a "AccessProvider" that receives the call:
GetModuleName(ModuleID) then looks in it's resource file for a "resource" called GetModuleName. This resource has multiple SQL statements connected to it and then it executes those SQL statements. It would then cache the "resource"
for faster execution next time.
Basically it is a pseudo stored procedure. This would work for mySQL and any other data source that came along. The SQL, Oracle, DB2 providers simply would not use these "resource" files.
If you find that useful at all please run with it. I will be trying it out myself in the next few weeks building on Kevin Weir's code. I know this sounds a little crazy but what if it actually worked?
The module developer still only has to code: GetModuleName(ModuleID)When the module developer wants to support Access they simply have to provide the "resource files".