F
fredd00
Hi
I'm just starting with singleton and would like to implement in my new
web app.
I have a question
lets say i create a singleton DataHelper that holds a static
SqlConnection object to share
and on my page I do
SqlConnection cn = DataHelper.GetConnection()
when 2 client request the page making a db call will i get an error
because the connection might be closed or in a state that prevents one
request from using it ?
What would be the advantage of using singleton objects over putting my
objects in application variables?
Thanks
I'm just starting with singleton and would like to implement in my new
web app.
I have a question
lets say i create a singleton DataHelper that holds a static
SqlConnection object to share
and on my page I do
SqlConnection cn = DataHelper.GetConnection()
when 2 client request the page making a db call will i get an error
because the connection might be closed or in a state that prevents one
request from using it ?
What would be the advantage of using singleton objects over putting my
objects in application variables?
Thanks