Click here to Skip to main content
16,010,650 members
Home / Discussions / C#
   

C#

 
GeneralRe: Get remote MAC!? Pin
activee17-Feb-06 1:16
activee17-Feb-06 1:16 
GeneralRe: Get remote MAC!? Pin
J4amieC17-Feb-06 2:33
J4amieC17-Feb-06 2:33 
GeneralRe: Get remote MAC!? Pin
activee17-Feb-06 2:46
activee17-Feb-06 2:46 
GeneralRe: Get remote MAC!? Pin
J4amieC17-Feb-06 3:18
J4amieC17-Feb-06 3:18 
QuestionHow to get the height of an image in millimeters? Pin
MaWeRic16-Feb-06 23:34
MaWeRic16-Feb-06 23:34 
QuestionStrange exception Pin
PKKSuomi16-Feb-06 23:28
PKKSuomi16-Feb-06 23:28 
AnswerRe: Strange exception Pin
J4amieC17-Feb-06 0:50
J4amieC17-Feb-06 0:50 
GeneralRe: Strange exception Pin
PKKSuomi19-Feb-06 23:48
PKKSuomi19-Feb-06 23:48 
Hi,

Thanks for the help!
I checked my code and I don't dispose the object. (I actually didn't find any .IsDisposed property for the connection object).
The code works really good for a number of tries and then suddenly it throws an exception. The error occurs very randomly.

"This might be a race condition against a connection object, or it might be you trying to re-invent connection pooling" - How can I check these issues?

I don't use any threads but I open and close the connection with the following code.

public static MySqlConnection Open()
{
try
{

MySqlConnection conn = new MySqlConnection(ConfigurationManager.AppSettings["MySqlConnectionString"].ToString());
conn.Open();
return conn;
}catch(Exception e){
string error = e.Message.ToString();
return null;
}
}

public static bool Close(MySqlConnection conn)
{
if (conn.State == System.Data.ConnectionState.Open)
{
try
{
conn.Close();
}
catch (Exception e)
{
string error = e.Message.ToString();
return false;
}
}
return true;
}
QuestionParameters in selectcommand Pin
Rmokkenstorm16-Feb-06 23:15
Rmokkenstorm16-Feb-06 23:15 
AnswerRe: Parameters in selectcommand Pin
Rmokkenstorm17-Feb-06 3:15
Rmokkenstorm17-Feb-06 3:15 
AnswerRe: Parameters in selectcommand Pin
J4amieC17-Feb-06 3:46
J4amieC17-Feb-06 3:46 
QuestionSetting selection in ListView control Pin
janman16-Feb-06 22:55
janman16-Feb-06 22:55 
AnswerRe: Setting selection in ListView control Pin
nandank8117-Feb-06 0:09
nandank8117-Feb-06 0:09 
QuestionListing tables in MS Access Pin
Ante116-Feb-06 22:49
Ante116-Feb-06 22:49 
AnswerRe: Listing tables in MS Access Pin
Nicholas Butler16-Feb-06 23:58
sitebuilderNicholas Butler16-Feb-06 23:58 
QuestionImport Excel Files Pin
edel_ong16-Feb-06 22:40
edel_ong16-Feb-06 22:40 
Questionhow to compare date today with another date? Pin
azmafaridah16-Feb-06 22:29
azmafaridah16-Feb-06 22:29 
AnswerRe: how to compare date today with another date? Pin
Ante116-Feb-06 22:52
Ante116-Feb-06 22:52 
GeneralRe: how to compare date today with another date? Pin
azmafaridah16-Feb-06 23:21
azmafaridah16-Feb-06 23:21 
GeneralRe: how to compare date today with another date? Pin
Ante116-Feb-06 23:41
Ante116-Feb-06 23:41 
GeneralRe: how to compare date today with another date? Pin
azmafaridah17-Feb-06 0:20
azmafaridah17-Feb-06 0:20 
GeneralRe: how to compare date today with another date? Pin
Luis Alonso Ramos17-Feb-06 16:37
Luis Alonso Ramos17-Feb-06 16:37 
QuestionRun .exe file through C# code. Pin
deep716-Feb-06 22:26
deep716-Feb-06 22:26 
AnswerRe: Run .exe file through C# code. Pin
deep716-Feb-06 22:43
deep716-Feb-06 22:43 
AnswerRe: Run .exe file through C# code. Pin
Jijo BP17-Feb-06 2:48
Jijo BP17-Feb-06 2:48 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.