2
Answers

Comments on database connection method

Ask a question
Simon Bradley

Simon Bradley

14y
3.6k
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)