G
Guest
I am attempting to use Visual Studio 2005 (Visual Basic) and the Enterprise
Library 2.0 Data Access Application Block with a Microsoft Access database. I
know the names of my Access databases but I don't know their location until
the user has started using the application. Therefore I cannot hardcode the
location into the app.config file as the Data Access Application Block seems
to need. So I have 2 questions:
1. Is it possible to use a relative path in the app.config file that will be
automatically replaced? For example, could I put in [AppDataPath] in the
app.config file as a placeholder and then replace it at runtime with
"C:\Documents and Settings\username\Application Data"?
2. If 1 above is not possible, is it possible to change the connection
string that is used by the DatabaseFactory.CreateDatabase() method so that I
can point it to my Access database?
Thanks in advance.
Library 2.0 Data Access Application Block with a Microsoft Access database. I
know the names of my Access databases but I don't know their location until
the user has started using the application. Therefore I cannot hardcode the
location into the app.config file as the Data Access Application Block seems
to need. So I have 2 questions:
1. Is it possible to use a relative path in the app.config file that will be
automatically replaced? For example, could I put in [AppDataPath] in the
app.config file as a placeholder and then replace it at runtime with
"C:\Documents and Settings\username\Application Data"?
2. If 1 above is not possible, is it possible to change the connection
string that is used by the DatabaseFactory.CreateDatabase() method so that I
can point it to my Access database?
Thanks in advance.