Re: Common Connection by Miha
Miha
Fri Dec 05 03:49:21 CST 2003
Hi Lora,
You might put your connection string inside app.config file, example:
<configuration>
<appSettings>
<add key="connectionString" value="data source=myserver;initial
catalog=Apps;Integrated Security=SSPI;packet size=4096" />
</appSettings>
</configuration>
either bind it at design time (DynamicProperties) or access it using
string conn =
System.Configuration.ConfigurationSettings.AppSettings["YourConnection"];
--
Miha Markic - RightHand .NET consulting & software development
miha at rthand com
"Lora Connors" <lora_con@yahoo.com> wrote in message
news:06c601c3bb00$2f761dd0$a501280a@phx.gbl...
> I'm working on an ADO.NET project. I'd like to declare a
> Common Variable that can store the Connection String
> values for a Database. I need this variable to be able to
> initialise the database connection for all
> OledbDataAdapters across all Form modules. Thanks!