Click here to Skip to main content
15,889,863 members
Home / Discussions / .NET (Core and Framework)
   

.NET (Core and Framework)

 
QuestionRe: combobox abnormally fires events when scrollbar is used on .NET 1.1 Pin
lecerf14-May-07 22:59
lecerf14-May-07 22:59 
Questionconfiguration connectionstrings Pin
wolfb8-May-07 3:38
wolfb8-May-07 3:38 
AnswerRe: configuration connectionstrings Pin
SimulationofSai8-May-07 4:10
SimulationofSai8-May-07 4:10 
GeneralRe: configuration connectionstrings Pin
wolfb8-May-07 4:44
wolfb8-May-07 4:44 
GeneralRe: configuration connectionstrings Pin
wolfb8-May-07 6:19
wolfb8-May-07 6:19 
GeneralRe: configuration connectionstrings Pin
Dave Kreskowiak8-May-07 6:42
mveDave Kreskowiak8-May-07 6:42 
GeneralRe: configuration connectionstrings Pin
wolfb8-May-07 7:05
wolfb8-May-07 7:05 
GeneralRe: configuration connectionstrings Pin
Dave Kreskowiak8-May-07 7:23
mveDave Kreskowiak8-May-07 7:23 
OK. If there isn't any file, why are you using the ConfigurationManager??

There IS a default inherited ConnectionStringSetting in the ConfigurationManager, regardless if there is a config file or not. This is comming from the machine.config and machine.default files in C:\WINDOWS\Microsoft.NET\Framework\<version>\CONFIG.

To tell your COnfigurationManager to forget about the inherited connectionstrings, create a config file in your app and add your connection string like this:
<?xml version="1.0" encoding="utf-8" ?>
    .
    . blah, blah, blah...
    .
    <connectionStrings>
        <clear/>
        <add name="myConnectiongStringName" providerName="System.Data.SqlClient" connectionString= "blah;blah;blah;" />
    </connectionStrings>

The clear/ line will tell the ConfigurationManager to dump all of the ConnectionStringSetting boject it currently has, including the default one, and build a new collection from the rest of the connectionStrings section.




A guide to posting questions on CodeProject[^]

Dave Kreskowiak
Microsoft MVP
Visual Developer - Visual Basic
     2006, 2007


GeneralRe: configuration connectionstrings Pin
wolfb8-May-07 7:40
wolfb8-May-07 7:40 
GeneralRe: configuration connectionstrings Pin
SimulationofSai8-May-07 21:27
SimulationofSai8-May-07 21:27 
AnswerRe: configuration connectionstrings Pin
kubben9-May-07 14:39
kubben9-May-07 14:39 
QuestionIs rebuilding changes the version of setup and deployment project Pin
Anhad7-May-07 23:02
Anhad7-May-07 23:02 
Questioncomponent authoring/architectures - et al Pin
urbane.tiger7-May-07 20:42
urbane.tiger7-May-07 20:42 
QuestionIndexing Folders on network Pin
kaushik_Manoj7-May-07 18:24
kaushik_Manoj7-May-07 18:24 
QuestionQuestion about Thread.Sleep() Pin
Tristan Rhodes7-May-07 10:45
Tristan Rhodes7-May-07 10:45 
AnswerRe: Question about Thread.Sleep() Pin
Wilco07-May-07 11:03
Wilco07-May-07 11:03 
GeneralRe: Question about Thread.Sleep() Pin
Tristan Rhodes7-May-07 11:14
Tristan Rhodes7-May-07 11:14 
AnswerRe: Question about Thread.Sleep() Pin
simsem7-May-07 20:55
simsem7-May-07 20:55 
GeneralRe: Question about Thread.Sleep() Pin
Tristan Rhodes8-May-07 2:51
Tristan Rhodes8-May-07 2:51 
GeneralRe: Question about Thread.Sleep() Pin
Colin Angus Mackay10-May-07 2:14
Colin Angus Mackay10-May-07 2:14 
GeneralRe: Question about Thread.Sleep() Pin
Tristan Rhodes10-May-07 2:35
Tristan Rhodes10-May-07 2:35 
GeneralRe: Question about Thread.Sleep() Pin
Colin Angus Mackay10-May-07 3:42
Colin Angus Mackay10-May-07 3:42 
GeneralRe: Question about Thread.Sleep() Pin
Tristan Rhodes10-May-07 4:29
Tristan Rhodes10-May-07 4:29 
GeneralRe: Question about Thread.Sleep() Pin
Colin Angus Mackay10-May-07 5:54
Colin Angus Mackay10-May-07 5:54 
GeneralRe: Question about Thread.Sleep() Pin
Tristan Rhodes10-May-07 6:25
Tristan Rhodes10-May-07 6:25 

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.