I think I'm giving my Microsoft 2003 Access application a migraine headache.
I wonder (1) if "import" is a better option than "link", (2) how to handle the ADODB.Recordsheets and SQL "Opens" efficiently, and (3)whether I should re-package my single .mdb module into multiple .mdb modules.
The client is converting from one third-party payroll system to another vendor. The source system provides a reasonably normalized workbook containing tabs for each source table. The target system requires a variety of (ugh) denormalized .csv files which I must derive from multiple tabs from the source workbook. I also have translation tables for, say, when the value for a given "military status code" on the source system is different than the target system requires.
My current approach is to create a single .mdb containing a class to create an Access 2003 table for each target file (One class dedicated to creating one output table) . I then export these tables to a spreadsheet (to retain the column headings) and then to a ".csv". I have also created a table for capturing errors.
I link to the individual tabs from the source workbook. And the same for my conversion spreadsheets. I have also created a number of "helper" classes to cleanse, reformat and perform other standard dirty deeds on my input fields.
For the ADODB.recordsets and open, since I don't really understand them, I've taken two approaches in my "helper" classes. In the first ones I wrote, I instantiate a new recordset every time I call the function. This, I believe, is probably exactly wrong (though I do use the same instance name and it doesn't seem to mind). The other approach that I'm using is to instantiate the recordset in the caller class and pass it "ByRef" to the helper class that needs it. (This offends my encapsulation sensibilities). A third option that I tried but didn't work (I suspect a skill deficiency here) was to open the ADODB.recordset in the helper class constructor.
In any case, every time I add a new link, the performance degrades noticably.
How would you approach this? Imports vs. Links, instantiate recordsets within the function or "by ref", keep in one .mdb load or break into multiple .mdbs -- if the latter is there a way to share my helper classes among .mdbs?
Whew!
Grandpa Brian
I wonder (1) if "import" is a better option than "link", (2) how to handle the ADODB.Recordsheets and SQL "Opens" efficiently, and (3)whether I should re-package my single .mdb module into multiple .mdb modules.
The client is converting from one third-party payroll system to another vendor. The source system provides a reasonably normalized workbook containing tabs for each source table. The target system requires a variety of (ugh) denormalized .csv files which I must derive from multiple tabs from the source workbook. I also have translation tables for, say, when the value for a given "military status code" on the source system is different than the target system requires.
My current approach is to create a single .mdb containing a class to create an Access 2003 table for each target file (One class dedicated to creating one output table) . I then export these tables to a spreadsheet (to retain the column headings) and then to a ".csv". I have also created a table for capturing errors.
I link to the individual tabs from the source workbook. And the same for my conversion spreadsheets. I have also created a number of "helper" classes to cleanse, reformat and perform other standard dirty deeds on my input fields.
For the ADODB.recordsets and open, since I don't really understand them, I've taken two approaches in my "helper" classes. In the first ones I wrote, I instantiate a new recordset every time I call the function. This, I believe, is probably exactly wrong (though I do use the same instance name and it doesn't seem to mind). The other approach that I'm using is to instantiate the recordset in the caller class and pass it "ByRef" to the helper class that needs it. (This offends my encapsulation sensibilities). A third option that I tried but didn't work (I suspect a skill deficiency here) was to open the ADODB.recordset in the helper class constructor.
In any case, every time I add a new link, the performance degrades noticably.
How would you approach this? Imports vs. Links, instantiate recordsets within the function or "by ref", keep in one .mdb load or break into multiple .mdbs -- if the latter is there a way to share my helper classes among .mdbs?
Whew!
Grandpa Brian