Last post Jun 22, 2011 11:06 PM by Fitmation
Jun 22, 2011 10:43 PM|Fitmation|LINK
there is no need to open and close connection, does the connection maintain open when using Database db = DatabaseFactory.CreateDatabase();
if redirect from web page 1 to web page 2 or page refresh, does this db connection closed? when will it close connection? How to dispose it?
if i save Database db = DatabaseFactory.CreateDatabase(); into a session, can it be stay open connection that i mean using the same connection session in SQL database?
is it a must to use endexecutereader?
Database db = DatabaseFactory.CreateDatabase();
using (IDataReader datareader = db.ExecuteReader(CommandType.Text, queryString))
old_Password = datareader["Password"].ToString();
Jun 22, 2011 11:00 PM|suresh_g_v2002|LINK
When you store it in session only the object reference is stored.., when you try to do some database operation, the ent lib opens the connections and closes itself.., so you need not worry to close the connection explicitly..
Jun 22, 2011 11:06 PM|Fitmation|LINK
when will it close connection?
if i want it to stay open connection even if page refresh, how to do?