|
web
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
Using Microsoft Access and Enterprise Library 2.0I 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. Hi dhussong
I worked with Enterprise Library Block 2003 v:1.1.0. Here what i will do is read the dataconfiguration.xml from my application and change the connection string and it is working. If you got any other option pls let me know.. Michael George Show quoteHide quote "dhussong" wrote: > 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.
Nothing as a char of a string
How to release a free source code? Copywriting or protecting your program Database update problems. Threading a Create Dataset method is there a way to do this How to show a form of c# in VB.Net from ? Running Apps and Threads String Tokenizing - Help! An idea to save learning time. |
|||||||||||||||||||||||