Re: connections from a data access class never get closed
Posted by: Claus Helth
Date: February 11, 2005 05:06AM

ups forgot to close my reader

public string GetUsers(){
string strResult = "";
MySqlDataReader reader = SqlSelect("SELECT * FROM `User`");

while(reader.Read() == true)
strResult += reader.GetString(0) + " ";

reader.Close();//This one has to be cloesed in every function call
return strResult;
}

Options: ReplyQuote




Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.