main logo
Subject: Re: Switching between Multiple Data dirs and single software project
Author: James Sayer
Posted: 2001/02/23 16:45:49
 
View Entire Thread
New Search


Greetings Bhavbhuti,

Let me start by saying that I would be more likely to have a single DBC and use a flag inside the tables to indicate the fiscal year (FY) that a record belongs to. This allows greater flexibility in the long run.

But since you have this other design... :o) I have never done what I'm about the suggest, but based upon what I have said before and experience I'm sure it would work.

User logs into the system. I would put them into a default directory, like the current FY. Examine the setup.prg for SetPath(). The path to the data files is set here. You must take this into account. Remove the data setting here and create a custom method in goApp to append your "desired" data path. This method must be able to remove the old data path and add the new data path. Good luck.

User selects a specific FY using a form with a combobox.
Close the current DBC. Reset the data path.
Open the new DBC. Assuming the tables are all named the same, the data environments should work as advertised.

I still like idea #1. If I had any say at all I would import all of the data to SQL and add a field for FY. Of course I'm wondering why people would be editing data from prior FYs... But you don't need to answer.
James Sayer
 
©2001 James Sayer
<-- Prior Message New Search Next Message -->