473,394 Members | 2,063 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,394 software developers and data experts.

reading values from the registry

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:

HKEY_LOCAL_MACHINE \ SOFTWARE \ MTI \ WEBAPPS

"conn1" = "Connection String 1 Here"
"conn2" = "Connection String 2 Here"
"conn3" = "Connection String 3 Here"

What I need to do is:
1 create a method that I can call passing in "conn1" or "conn2" or "conn3"
as a parameter.
2 get the connection string value
3 return the value to what ever called the method

Any suggestions?

Thanks
Jack David
Jul 21 '05 #1
1 1678
Hi Jack,

Here's a link to a KB article that should help.

HOW TO: Write Your Own Registry Accessing Functions by Using the Base Class
Libraries in Visual Basic .NET
http://support.microsoft.com/default...NoWebContent=1

--
Rob Windsor
G6 Consulting
Toronto, Canada

"Jack David" <ge*********@hotmail.com> wrote in message
news:OM*************@TK2MSFTNGP12.phx.gbl...
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:

HKEY_LOCAL_MACHINE \ SOFTWARE \ MTI \ WEBAPPS

"conn1" = "Connection String 1 Here"
"conn2" = "Connection String 2 Here"
"conn3" = "Connection String 3 Here"

What I need to do is:
1 create a method that I can call passing in "conn1" or "conn2" or "conn3"
as a parameter.
2 get the connection string value
3 return the value to what ever called the method

Any suggestions?

Thanks
Jack David

Jul 21 '05 #2

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

Similar topics

2
by: Håvard Olerud Eriksen | last post by:
Is there any way to use php to connect to a series of external servers and read some registry values without compromising the security setup of these servers? OK, this may sound like hacking but...
5
by: Dhilip Kumar | last post by:
Hi All, I'm writing a Windows Service app using C#. I need to read some configuration settings before the service starts up. These settings will be used by the service in its operation. ...
5
by: Scott M. Lyon | last post by:
I've just discovered a bug in some code I wrote a little while ago, and I need you guys' help to fix it. My program imports data from a standard Excel Spreadsheet (just with specific column...
3
by: Ahmad Jalil Qarshi | last post by:
Hi! I am developing an application in C# as a windows NT Service. This application needs to check for eventlog using EventLog.Exists("System") But unfortunately it generates exception...
5
by: UJ | last post by:
I have a system that has five programs that all communicate with each other via Message Queues. Works well. One program is a watchdog that will make sure the others are up and going. Currently I...
3
by: Aussie Rules | last post by:
Hi, I want to store some data in the registry, however I have not been able to do this, and think my logic maybe flawed. Firstly I try to open the registry and read in any existing values....
7
by: fniles | last post by:
In my case, I have registry entries with multiple Key values, like the following I would like to loop thru MyApp\MySection\Data to get to entries A,B and C, instead of doing the...
4
by: RhavoX | last post by:
Hi. This may be a very stupid question but I'll leave you to judge it ;) I know there were lots of questions about this but none of the answers suits me. I'm wondering how to get the BINARY type...
1
by: =?Utf-8?B?TWljaGVs?= | last post by:
Hello, When I try to retrieve values from the register with Select Case Dir(CStr(My.Computer.Registry.GetValue("HKEY_LOCAL_MACHINE\Software\Kassasysteem\Gegevenslocatie", "Gegevenspad", ""))...
2
by: terryastone | last post by:
I have an application that reads some registry values stored in the Local Machine\Software\... key. In XP, I can see these values using RegEdit. In my application I can read the values at...
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: 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
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
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
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...
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.