Creating database connections - Do it once or for each query?
- by webnoob
At the moment I create a database connection when my web page is first loaded. I then process the page and run any queries against that conection. Is this the best way to do it or should I be creating a database connection each time I run a query?
p.s It makes more sense to me to create 1 connection and use it but I don't know if this can cause any other issues.
I am using C# (ASP.NET) with MSSQL.