|
-
Oct 26th, 2008, 06:52 PM
#2
Re: [2005] saving to app.config question
When you get a NullReferenceException the first thing to do is determine which reference is null. You can't fix something if you don't know what you're fixing. On that line there are only really two possibilities: appSettings or appSettings("OldConnectionString"). I'm not sure if the first one is possible but, if it is, it would be because your config file has no appSettings section. If appSettings is not Nothing then it must be that your appSettings section doesn't have a key named "OldConnectionString". That second is the more likely because, if you've done things the way I did in my example then you don't have a full connection string in the appSettings section. Full connection strings should be stored in the connectionStrings section.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|