|
.net
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
Connection String how to...<configuration>
<connectionStrings> <add name="Northwind" connectionString="Data Source=localhost;Integrated Security=SSPI;Initial Catalog=Northwind;" providerName="System.Data.SqlClient" /> </connectionStrings> </configuration>How to access "Northwind" from the c# code?I supposed to write String s = ConfigurationSettings.ConnectionStrings["Northwind"].ConnectionStringbut it causes an error that ConnectionStrings section is not found.What do I do wrong? <add key="Northwind" value="server=127.0.0.1;User
id=sa;Password=23131;database=Northwind;"/> string s = ConfigurationSettings.AppSettings["ConnectionString"]) Jacek Jurkowski wrote: Show quoteHide quote ><configuration> > <connectionStrings> > <add name="Northwind" > connectionString="Data Source=localhost;Integrated >Security=SSPI;Initial Catalog=Northwind;" > providerName="System.Data.SqlClient" /> > </connectionStrings> ></configuration>How to access "Northwind" from the c# code?I supposed to >write String s = >ConfigurationSettings.ConnectionStrings["Northwind"].ConnectionStringbut it >causes an error that ConnectionStrings section is not found.What do I do >wrong? <add key="Northwind" value="server=127.0.0.1;User
id=sa;Password=23131;database=Northwind;"/> string s = ConfigurationSettings.AppSettings["Northwind"]) Jacek Jurkowski wrote: Show quoteHide quote ><configuration> > <connectionStrings> > <add name="Northwind" > connectionString="Data Source=localhost;Integrated >Security=SSPI;Initial Catalog=Northwind;" > providerName="System.Data.SqlClient" /> > </connectionStrings> ></configuration>How to access "Northwind" from the c# code?I supposed to >write String s = >ConfigurationSettings.ConnectionStrings["Northwind"].ConnectionStringbut it >causes an error that ConnectionStrings section is not found.What do I do >wrong? Pan Jacek mysle ze pan juz wie jak to robi
Patrick * Jak nie to prosze zapytac Show quoteHide quote "Jacek Jurkowski" <pcmi***@priv1.onet.pl> wrote in message news:uRyt6ov$FHA.3864@TK2MSFTNGP12.phx.gbl... > <configuration> > <connectionStrings> > <add name="Northwind" > connectionString="Data Source=localhost;Integrated > Security=SSPI;Initial Catalog=Northwind;" > providerName="System.Data.SqlClient" /> > </connectionStrings> > </configuration>How to access "Northwind" from the c# code?I supposed to > write String s = > ConfigurationSettings.ConnectionStrings["Northwind"].ConnectionStringbut it > causes an error that ConnectionStrings section is not found.What do I do > wrong? > >
Other interesting topics
ASP.NET 2.0 Themes are not WYSIWYG
Javascript two fields merged to one hidden field Exceptions kill Sessions? total newbie question about Listbox.selectedindex Print Page Rewriting a URL that does not point to a file Role based security ImageMap Coordinate Question Scalable web architecture with ASP.NET 2.0 asp treeview |
|||||||||||||||||||||||