473,657 Members | 2,700 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Using Microsoft Access and Enterprise Library 2.0

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:\Documen ts and Settings\userna me\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.
Apr 14 '06 #1
1 1947
Hi dhussong
I worked with Enterprise Library Block 2003 v:1.1.0.
Here what i will do is read the dataconfigurati on.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

"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:\Documen ts and Settings\userna me\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.

Jun 21 '06 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

28
2284
by: John Bailo | last post by:
Funny, how Bill Gate uses the Deutsches Bank and Barron's to defraud people and try to wreck his competitors ( he can't ). For example, http://www.reuters.com/financeNewsArticle.jhtml?type=hotStocksNews&storyID=4262964 Oh, but see how Barron's and MS are in bed together...
4
5488
by: John Morgan | last post by:
I have Enterprise Manager on my local machine. For the last twelve months it has been connecting without problem to my online SQL Server database provided by my ISP. Three weeks ago the ISP applied some sort of extra security arrangements to their SQL Server to allow access only through port 1433. they have told me to configure an alias using Network Client and to register this alias in the usual way using my Enterprise Manager. My...
0
1317
by: John Dalberg | last post by:
I am getting the error below many times when I am trying to use the Enterprise Library. The solution seems to be a reboot. I am using Windows 2003 as my dev box. The error also happens with other library blocks. I am in the admin group in the machine and I changed the processmodel in machine.config to SYSTEM. AFAIK, I have elevated my access to the highest.
9
1747
by: reshugoyal | last post by:
Hi, I need to implement Auto Updates in my application wherein I will be installing the application using msi. First time I will be installing it through CD.( Directly running the MSI file) Next time any of my clients run the application and if newer version is available(which has to be specified on server) they must get a notification that "New version is available. Do you want to Download/Install?" and depending on the user action if...
0
5003
by: Eniac | last post by:
Hello, I've started using Enterprise Library 2.0 recently and I've encountered a problem that seems to be ... well... undocumented :) Basically, when I set a Trace Listener (formatted event log to be precise), if i specify the name of a custom event log, the listener won't log in it. I've checked in the registry, the log is there. In the event viewer, I
6
14146
by: Dhananjay | last post by:
hello everyone i have got a problem i want to design business layer, data access layer , presentation layer for asp.net using C#.net , can anyone help me to solve this problem. i want some resources to complete this. i am trying very hard. Do you have any idea about website or any links where i can find some examples based on this concept.can you plz provide me , its urgent i want this solution with an example, if u have plz provide me. ...
0
3858
by: nostradumbass77 | last post by:
Using Enterprise Library 2.0 (Jan 06) and .NET 2.0 (VB.Net 2005) Dim dbPF As Data.Common.DbProviderFactory Try dbPF = Data.Common.DbProviderFactories.GetFactory("System.Data.OleDb") db = New Microsoft.Practices.EnterpriseLibrary.Data.GenericDatabase( _ "Provider=Microsoft.Jet.OLEDB.4.0;Data
1
2390
by: =?Utf-8?B?QnJpYW4gTmllbHNlbg==?= | last post by:
Hi I'm trying to use the Cryptography application block within a web application and have encountered a problem that I hope you can help resolve. 1. When I create a key file through "Enterprise Library Configuration", I select e.g the 3DES provider and goes through the wizard of creating a key. A part of the wizard wants to further enhance security by encrypting the key either in "User mode" or "Machine mode", using the currently...
0
8319
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8739
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8512
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
1
6175
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5638
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4329
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2739
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
1969
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
2
1732
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.