Viewing 4 posts - 1 through 4 (of 4 total)
Thank you for all your help.
I will try a diferent approach...if i manage to do it, i will tell you i how i have done it.
Best regards
Miguel Ferreira
October 4, 2005 at 11:12 am
I already tryed the lock aproach in c#:
Example:
public SqlCeConnection getConnection()
{
lock(ssceconn)
{
while (!available)
{
Monitor.Wait(ssceconn);
}
if (ssceconn.State.Equals(ConnectionState.Closed))
throw new SqlCeException();
available = false;
Monitor.Pulse(ssceconn);
return ssceconn;
}
}
public void releaseConnection ()
{
lock(ssceconn)
{
available = true;
Monitor.Pulse(ssceconn);
}
}
But in C#...
October 4, 2005 at 6:00 am
If i open a connection, can i perform an update and a simple query at the same time (using the same connection) in two diferent threads, one performing the update...
October 4, 2005 at 4:35 am
Viewing 4 posts - 1 through 4 (of 4 total)