How Do I make the same application look at Different Queries in different Modes?
posted 8 years ago
Hi, I have an Application . Basically, what I need to do is to make the application Use different queries to access data from the database.
Eg, Application in A mode uses a DAO to get the name and address of the users.
Application in B mode uses the same DAO to get the name and address, also telephone detail, email address of the Users. There are two queries in the DAO, when app is in Mode a, it looks at DAO and execute the first query, when in mode B, it looks at the same DAO and execute the second query.
Right, I thought about doing this by having two links on the home page, when you Select App Mode A link, it always execute Query one, when you Select link two which is APP in B mode, it executes Query Two.
HOw do I pass Parameters so that App knows it is in A mode, or B mode. Or better still, what is the best way of doing this, please tell me. I just want Ideas and I would really appreciate it.