473,386 Members | 1,908 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,386 software developers and data experts.

How to get the connection string from a text file

The company I work is considering to use the Enterprise Library
(january/2006) Data Data Access Application Block. The problem is an internal
policy that forces all company systems to get the connection string from a
text file that already exists in the network.

Is there any way to just pass the connection string to the Data Data Access
Application Block instead of getting it from the app.config or web.config?

I belive I´ll have to implement this functionality, so any help on where to
start would be great.

Thanks for any help.
Mar 21 '06 #1
2 1071
Fábio,
an alternative would be by using the classes OracleDatabase or SqlDatabase
accordingly to the db you are using, there is a constructor that takes the
connection string as a parameter for both classes.

Bruno

"Fábio Couto" <Fb*******@discussions.microsoft.com> wrote in message
news:98**********************************@microsof t.com...
The company I work is considering to use the Enterprise Library
(january/2006) Data Data Access Application Block. The problem is an
internal
policy that forces all company systems to get the connection string from a
text file that already exists in the network.

Is there any way to just pass the connection string to the Data Data
Access
Application Block instead of getting it from the app.config or web.config?

I belive I´ll have to implement this functionality, so any help on where
to
start would be great.

Thanks for any help.

Mar 21 '06 #2
You can programmatically build the dataConfiguration.config file.

It takes a little work.

Q: How do I programmatically change existing configuration data?
http://channel9.msdn.com/wiki/defaul...riseLibraryFAQ
and/or

http://www.pnplive.com/Askpnp/askpnp16-May-2005.htm
Creating the Config Dynamically
You can google search a few more things also, now that you know what you're
looking for.

"Bruno Piovan" <brunopiovan AT gmail DOT COM - NO SPAM> wrote in message
news:O1**************@TK2MSFTNGP14.phx.gbl...
Fábio,
an alternative would be by using the classes OracleDatabase or SqlDatabase
accordingly to the db you are using, there is a constructor that takes the
connection string as a parameter for both classes.

Bruno

"Fábio Couto" <Fb*******@discussions.microsoft.com> wrote in message
news:98**********************************@microsof t.com...
The company I work is considering to use the Enterprise Library
(january/2006) Data Data Access Application Block. The problem is an
internal
policy that forces all company systems to get the connection string from a text file that already exists in the network.

Is there any way to just pass the connection string to the Data Data
Access
Application Block instead of getting it from the app.config or web.config?
I belive I´ll have to implement this functionality, so any help on where
to
start would be great.

Thanks for any help.


Mar 21 '06 #3

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

Similar topics

0
by: JWM | last post by:
I am trying to implement Oracle connection pooling for the following code, which was written by someone else. Here is my main question -- this java file creates code that is executed every hour,...
11
by: David | last post by:
I am writing SQL data apps using VB.NET 2003, MSDE is being used as the server. When I create and instance of the server, it has a the format machinename/instancename This is fine for the...
9
by: Dr. Know | last post by:
Greetings, I am running IIS on W2kServer and am trying to use ASP with some legacy X-Base tables. I cannot get the provider to connect. Relevant code is: strProvider =...
4
by: Brian Rice | last post by:
I have a socket application that is sending and receiving packets asynchronously. It works great except, when I receive packets that are larger than my receive buffer which then generate several...
4
by: Charlie | last post by:
Hi: I'm storing my dB connection in web.config file. Since it will be easily read by opening file, what is a good way to secure it? Thanks, Charlie
1
by: sal | last post by:
Greets, All Question with udl and connection string does it work? I'm having problems with the code below I keep getting an error "Keyword not supported 'File Name'" I was just following...
3
by: thejamie | last post by:
My question: "What is the correct connection object to use in VS 2005 for a text connection?" will need some background. I am placing code at the end showing how I am reading data from a text file...
1
by: Sankalp | last post by:
Hi, I am using VB 2005. My application has many data bound controls. The connection is stored in the app.config file. I want the application to start with a default connection string and while...
0
by: Buddy Home | last post by:
Hello, I'm trying to upload a file programatically and occasionally I get the following error message. Unable to write data to the transport connection: An established connection was aborted...
2
by: Brad Pears | last post by:
We have several applications that use the ".exe.config" .xml file to get the connection string to our SQL server db. Each user of the application has their own .xml file because we have some user...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
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
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: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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
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...
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...

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.