Thanks for your reply. I understand how to create a config file on startup but that isn't really an option. Even after the application has started (and already loaded the configuration file), there will be tables added to the database. Let me give you a more specific description of the schema.
I have a table called filecabinets that holds meta data about file cabinets that users can create. It contains fields like fc_id, name, etc. It also has fields to connect it to a table like, table_name. Each row in the filecabinets table represents a file cabinet and there is a whole table in the database represented by each filecabinet. There is another table that contains further information about each filecabinet table such as field names. I might have a hundred different filecabinets, if not more.
What I need is a general class that would map to the known fields in field cabinet such as name, fc_id, but also other parametized methods that would allow me to pass in the field names for that specific file cabinet and get back the values.
class filecabinet {
string getFcId()
string getName();
string[] getFields()
string getFieldValue(string fieldName)
}
Any ideas?
|