473,506 Members | 16,951 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Where to store connection info

Rob
The app.config in VB 2005 appears to be riddled with bugs....

From solution explorer I right click on the Project | Properties... then I
use the grid to add the app settings... AND they are saved in the
app.config.xml as well, however, the program uses the value that were
originally stored in the settings.

I have run the Build and Saved the file, I even exited and re-opened the
program as well as rebooted the machine.

I have no idea where it is getting the original values from, however, when I
double click on the app.config I get many messages stating that it "Could
not find schema information for this element or that attribute". Could the
xsd be corrupt ? How to fix ?

I am about to give up on using the app.config... is my only other option to
store the connections as Public variables in a startup routine ?
Jul 7 '07 #1
4 2020

"Rob" <ro***@yahoo.comwrote in message
news:Lp******************************@comcast.com. ..
The app.config in VB 2005 appears to be riddled with bugs....

From solution explorer I right click on the Project | Properties... then I
use the grid to add the app settings... AND they are saved in the
app.config.xml as well, however, the program uses the value that were
originally stored in the settings.
The program is using appname.exe.config is where it's getting its app.config
information.

App.config in the project is just a template and appname.exe.config is built
when the exe is built, which appname.exe.config is built from app.config.

So, if you don't move appname.exe.config to wherever appname.exe is located,
then the appname.exe is going to use the old appname.exe.config with old
settings.
>
I have run the Build and Saved the file, I even exited and re-opened the
program as well as rebooted the machine.

I have no idea where it is getting the original values from, however, when
I double click on the app.config I get many messages stating that it
"Could not find schema information for this element or that attribute".
Could the xsd be corrupt ? How to fix ?
I am not having that problem when double clicking the app.config in the
project, the file in the project location on the HD or the
appname.exe.config on the HD where the appname.exe is located to open the
file up in the IDE.
>
I am about to give up on using the app.config... is my only other option
to store the connections as Public variables in a startup routine ?
I am using VB 2005 Express with no problems in this area in using an
app.config file in a VB.NET project.

Jul 7 '07 #2
Rob
Thank you so much for taking the time to respond... I have worked all day on
this...

So may I edit this file directly ? I think I like the VS 2003 solution
better...

Rob
"Mr. Arnold" <MR. Ar****@Arnold.comwrote in message
news:es**************@TK2MSFTNGP03.phx.gbl...
>
"Rob" <ro***@yahoo.comwrote in message
news:Lp******************************@comcast.com. ..
>The app.config in VB 2005 appears to be riddled with bugs....

From solution explorer I right click on the Project | Properties... then
I use the grid to add the app settings... AND they are saved in the
app.config.xml as well, however, the program uses the value that were
originally stored in the settings.

The program is using appname.exe.config is where it's getting its
app.config information.

App.config in the project is just a template and appname.exe.config is
built when the exe is built, which appname.exe.config is built from
app.config.

So, if you don't move appname.exe.config to wherever appname.exe is
located, then the appname.exe is going to use the old appname.exe.config
with old settings.
>>
I have run the Build and Saved the file, I even exited and re-opened the
program as well as rebooted the machine.

I have no idea where it is getting the original values from, however,
when I double click on the app.config I get many messages stating that
it "Could not find schema information for this element or that
attribute". Could the xsd be corrupt ? How to fix ?

I am not having that problem when double clicking the app.config in the
project, the file in the project location on the HD or the
appname.exe.config on the HD where the appname.exe is located to open the
file up in the IDE.
>>
I am about to give up on using the app.config... is my only other option
to store the connections as Public variables in a startup routine ?

I am using VB 2005 Express with no problems in this area in using an
app.config file in a VB.NET project.

Jul 7 '07 #3

"Rob" <ro***@yahoo.comwrote in message
news:tu******************************@comcast.com. ..
Thank you so much for taking the time to respond... I have worked all day
on this...
So may I edit this file directly ? I think I like the VS 2003 solution
better...
You can use the System.ConfigurationManager namespace in .Net Framework 2.0
to manipulate/write/read appname.exe.config or you can do it manually. It
will even get the connection string data with ease.

Lookup ConfigurationManager on Google which should give you examples as to
what you can do with ConfigurationManager.

Regardless of it being 2003 or 2005, what the program is using is
appname.exe.config, and app.config is just a template to build
appname.exe.config.

In 2003 using Framework 1.1 would have needed to download and install the
Application Block. Now, it's part of the 2.0 Framework.
<snipped>

Jul 7 '07 #4
Rob
Thanks Again ! You really saved me a lot of time....
-Rob
"Mr. Arnold" <MR. Ar****@Arnold.comwrote in message
news:OM**************@TK2MSFTNGP06.phx.gbl...
>
"Rob" <ro***@yahoo.comwrote in message
news:tu******************************@comcast.com. ..
>Thank you so much for taking the time to respond... I have worked all day
on this...

>So may I edit this file directly ? I think I like the VS 2003 solution
better...

You can use the System.ConfigurationManager namespace in .Net Framework
2.0 to manipulate/write/read appname.exe.config or you can do it manually.
It will even get the connection string data with ease.

Lookup ConfigurationManager on Google which should give you examples as to
what you can do with ConfigurationManager.

Regardless of it being 2003 or 2005, what the program is using is
appname.exe.config, and app.config is just a template to build
appname.exe.config.

In 2003 using Framework 1.1 would have needed to download and install the
Application Block. Now, it's part of the 2.0 Framework.
<snipped>

Jul 7 '07 #5

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

Similar topics

3
1750
by: faktujaa | last post by:
Hi, Currently im storing the connection info. in XML file on the C drive. the only problem with this is that anybody can open and check the database name. I know encryption can solve this problem...
4
2687
by: Steve | last post by:
C# I am trying to store my connection settings in a config file, mainly so I can easily change the db that the app connects to without doing a release of code. I have the config file sorted...
10
2393
by: Dica | last post by:
i've got an app that needs to connect to sql server and login with a useName/password. currently, my app saves this info in an XML file in plain text (i.e. no encryption). everytime the app is...
4
1555
by: Andrew | last post by:
Hello, friends, I have two questions: (1) In asp.net, where is the best place to store DB connection string? (We have .dll to handle all DB queries.) (2) Any sample source code for client...
5
1126
by: Rob | last post by:
Where is the best place to store database connection info in a vb.net program ? I do not want to "hard-code" a database name into my program. Where could I store and retrieve that information ? ...
3
1717
by: Hans Merkl | last post by:
Hi, I am helping to build a web app that's pretty much a wrapper around a web service. The question now is how to store the handle of the web service object between requests. My client is using...
1
3395
by: rdemyan via AccessMonster.com | last post by:
I'm trying to implement a licensing scheme. There are three types of licenses: Trial - good for 30 to 60 days Interim - good for 1 year Fully Paid - no expiration Everything is working fine...
8
2551
by: Merk | last post by:
I'm looking for a safe and maintainable way to store connection string info (connecting to SQL Server 2005 from .NET 2.0 Windows Forms client app); things like server name or IP address and...
0
7307
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
7370
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...
1
7021
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
7478
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
5614
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,...
1
5035
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...
0
3177
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1532
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 ...
1
755
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.