Click here to Skip to main content
15,884,628 members
Home / Discussions / C#
   

C#

 
AnswerRe: Is there any learning docs for begines? Pin
behesht23-Jun-09 19:22
behesht23-Jun-09 19:22 
GeneralRe: Is there any learning docs for begines? Pin
Anubhava Dimri23-Jun-09 19:42
Anubhava Dimri23-Jun-09 19:42 
AnswerRe: Is there any learning docs for begines? Pin
JollyMansArt23-Jun-09 19:29
JollyMansArt23-Jun-09 19:29 
QuestionXMODEM File Transfer Pin
Sifar - 023-Jun-09 18:41
Sifar - 023-Jun-09 18:41 
AnswerRe: XMODEM File Transfer Pin
Philip.F23-Jun-09 21:33
Philip.F23-Jun-09 21:33 
QuestionXML -- Call me stupid -- LOL [modified] Pin
JollyMansArt23-Jun-09 16:40
JollyMansArt23-Jun-09 16:40 
AnswerRe: XML -- Call me stupid -- LOL Pin
N a v a n e e t h23-Jun-09 18:13
N a v a n e e t h23-Jun-09 18:13 
QuestionRe: XML -- Call me stupid -- LOL [modified] Pin
JollyMansArt23-Jun-09 19:04
JollyMansArt23-Jun-09 19:04 
I tried that but I can not seem to get the value to return properly... Here is what I do..


I go to the application project manager,
right click on project
Say properties
Go to the settings tab and put


Name: SQLConnectionString
Type: string
Scope: Application
Value: "Data Source=PA-DEVPLATFORM1\SQL2005;Initial Catalog=AppLoader;Persist Security Info=True;User ID=Mike;Password=zephyr"


This SQLConnection String I am wanting in a external XML file editable to the end user so I do not have to recompile the application for every sql server change.

Here is the code I am using to call it. It does not work.
SqlConnection conn = new SqlConnection(Properties.Settings.Default.SQLConnectionString);


I can not seem to get
ConfigurationSettings.AppSettings
to be identified as a valid command...

I got close by adding
public static NameValueCollection AppSettings { get; }

but the applications says it needs a set added to it.

PLEASE any help on this?



----------------------------------------------------------

So far I have figured out to get the setting I think I need to do this?
SqlConnection conn = new SqlConnection(System.Configuration.ConfigurationSettings.AppSettings["SQLConnectionString"].ToString());
But it still comes back saying the string is null... Why?

modified on Wednesday, June 24, 2009 1:54 AM

AnswerRe: XML -- Call me stupid -- LOL [modified] Pin
JollyMansArt23-Jun-09 19:58
JollyMansArt23-Jun-09 19:58 
AnswerRe: XML -- Call me stupid -- LOL Pin
OriginalGriff23-Jun-09 21:27
mveOriginalGriff23-Jun-09 21:27 
GeneralRe: XML -- Call me stupid -- LOL Pin
Sk9323-Jun-09 23:07
Sk9323-Jun-09 23:07 
AnswerRe: XML -- Call me stupid -- LOL Pin
Eslam Afifi23-Jun-09 18:25
Eslam Afifi23-Jun-09 18:25 
QuestionHttp post [modified] Pin
kibromg23-Jun-09 12:32
kibromg23-Jun-09 12:32 
AnswerRe: Http post Pin
Gary Stafford23-Jun-09 14:34
Gary Stafford23-Jun-09 14:34 
Questionactive directory users Pin
caiena23-Jun-09 10:58
caiena23-Jun-09 10:58 
AnswerRe: active directory users [modified] Pin
EliottA23-Jun-09 11:01
EliottA23-Jun-09 11:01 
GeneralRe: active directory users Pin
caiena23-Jun-09 11:15
caiena23-Jun-09 11:15 
AnswerRe: active directory users [modified] Pin
rolandm661023-Jun-09 11:49
rolandm661023-Jun-09 11:49 
QuestionBreakpoint problem Pin
Dan Neely23-Jun-09 10:21
Dan Neely23-Jun-09 10:21 
AnswerRe: Breakpoint problem Pin
EliottA23-Jun-09 10:28
EliottA23-Jun-09 10:28 
GeneralRe: Breakpoint problem Pin
Dan Neely23-Jun-09 10:42
Dan Neely23-Jun-09 10:42 
GeneralRe: Breakpoint problem Pin
EliottA23-Jun-09 10:44
EliottA23-Jun-09 10:44 
GeneralRe: Breakpoint problem Pin
Dan Neely23-Jun-09 10:50
Dan Neely23-Jun-09 10:50 
GeneralRe: Breakpoint problem Pin
EliottA23-Jun-09 10:52
EliottA23-Jun-09 10:52 
AnswerRe: Breakpoint problem Pin
Christian Graus23-Jun-09 10:28
protectorChristian Graus23-Jun-09 10:28 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.