473,395 Members | 1,456 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

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:\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.
Apr 14 '06 #1
1 1926
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

"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.

Jun 21 '06 #2

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

Similar topics

28
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, ...
4
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...
0
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...
9
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)...
0
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...
6
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...
0
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...
1
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...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
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...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

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.