Forum Replies Created

Viewing 4 posts - 1 through 4 (of 4 total)

  • RE: SqlServerCE - Two connections to database

    I have sent you a PM.

  • RE: SqlServerCE - Two connections to database

    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

  • RE: SqlServerCE - Two connections to database

    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#...

  • RE: SqlServerCE - Two connections to database

    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...

Viewing 4 posts - 1 through 4 (of 4 total)