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

reading connection string into a vb application...

I want to have my SQL Server 2000 database connection string data in an .ini
file or a .xml file and then read that string into my vb.net 2005 app -
rather than hard code the connection string in the app.

What are most programmers doing and how do I read this data into my program
on startup?

Thanks! Brad
Mar 27 '07 #1
3 5943
I use an INI file and read it in. I encrypt it though to keep prying eyes
out. Don't want just anyone seeing how to access your database.

"Brad Pears" <br***@truenorthloghomes.comwrote in message
news:%2****************@TK2MSFTNGP04.phx.gbl...
>I want to have my SQL Server 2000 database connection string data in an
.ini file or a .xml file and then read that string into my vb.net 2005
app - rather than hard code the connection string in the app.

What are most programmers doing and how do I read this data into my
program on startup?

Thanks! Brad

Mar 27 '07 #2

VS2005 (2.0) has a complete methodology for using connection strings.

I would not suggest reinventing it.

http://www.google.com/search?hl=en&q...%22+web.config

http://www.arcware.net/archive/2005/01/01/1056.aspx

"Brad Pears" <br***@truenorthloghomes.comwrote in message
news:%2****************@TK2MSFTNGP04.phx.gbl...
I want to have my SQL Server 2000 database connection string data in an
..ini
file or a .xml file and then read that string into my vb.net 2005 app -
rather than hard code the connection string in the app.

What are most programmers doing and how do I read this data into my
program
on startup?

Thanks! Brad


Mar 27 '07 #3
Isn't the web.config file only used in asp applications though?? I am using
vb.net 2005.

Thanks, Brad

"sloan" <sl***@ipass.netwrote in message
news:uF**************@TK2MSFTNGP02.phx.gbl...
>
VS2005 (2.0) has a complete methodology for using connection strings.

I would not suggest reinventing it.

http://www.google.com/search?hl=en&q...%22+web.config

http://www.arcware.net/archive/2005/01/01/1056.aspx

"Brad Pears" <br***@truenorthloghomes.comwrote in message
news:%2****************@TK2MSFTNGP04.phx.gbl...
>I want to have my SQL Server 2000 database connection string data in an
.ini
>file or a .xml file and then read that string into my vb.net 2005 app -
rather than hard code the connection string in the app.

What are most programmers doing and how do I read this data into my
program
>on startup?

Thanks! Brad



Mar 28 '07 #4

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

Similar topics

1
by: Jack David | last post by:
The person that was helping us develop our application has left the project and has left us with the following: The connection strings for the database are stored in the registry: ...
21
by: JoKur | last post by:
Hello, First let me tell you that I'm very new to C# and learning as I go. I'm trying to write a client application to communicate with a server (that I didn't write). Each message from the...
3
by: dale zhang | last post by:
Hi, I am trying to read an image from MS Access DB based on the following article: http://www.vbdotnetheaven.com/Code/Sept2003/2175.asp The article author is using PictureBox for windows...
4
by: dale zhang | last post by:
Hi, I am trying to save and read an image from MS Access DB based on the following article: http://www.vbdotnetheaven.com/Code/Sept2003/2175.asp Right now, I saved images without any...
2
by: Chuck Ritzke | last post by:
Hi all, I am getting an intermittant error after uploading a project from my development machine. I click on a link which opens an aspx page that, upon page load, reads a very small amount of...
4
by: Jason Kumpf | last post by:
OK I've been staring at this code all day and still with everything I have tried I cannot figure out two problems I am having. Once is why the space limit for the directory I create in the code...
1
by: svijay | last post by:
hi I have got a strange problem. May I know any solution for this. Here is the detailed description about the problem We have got a mainframe system and also production and development...
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...
8
by: Can2002 | last post by:
I've been trying to put together an application to change channel on a media streaming server. The server is able to issue IR commands to its attached equipment using LIRC, with commands being...
2
by: Johnson | last post by:
I'm trying to fix a "sub optimal" situation with respect to connection string management. Your thoughtful responses will be appreciated. I just started with a new client who has a bunch of legacy...
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:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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...
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
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
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
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
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...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

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.