2
Answers

Comments on database connection method

Simon Bradley

Simon Bradley

15y
3.9k
1

Hi there,
I was wondering if i could use database connection code in the global.asax like the following. I'm doing my first .net web app currently.
public static DatabaseConnection Connection
{
get
{
string connectionString =
"Initial Catalog = ??????????; Integrated " +
"Security = true; Network Library = ????????; " +
"Packet Size = 4096";
return new DatabaseConnection("Data Source = ????????; " + connectionString);
}
}

Any comments would be much appreciated chaps.
Answers (2)