ODBC pessimistic lock

From: "Marian Naghen" <naghen(at)ratb(dot)ro>
To: <pgsql-odbc(at)postgresql(dot)org>
Subject: ODBC pessimistic lock
Date: 2005-11-15 11:57:08
Message-ID: 003101c5e9db$b44641a0$f503a8c0@lapcontr01
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-odbc

How can I aquire pessimistic locking using MFC ODCB classes ?

I used this code but no exception is raising on the second process.

/////////////////////////////////////////////////////////////////////////////////////////////////////////////////
CString sSQL = "SELECT * FROM table_1 WHERE table_id = 1 FOR UPDATE";

// open recordset:

try

{

if(!m_pSet->IsOpen())

{

m_db.BeginTrans();

m_pSet->Open(CRecordset::snapshot, sSQL); // dynasets not supported

}

}

catch(CDBException *e)

{

e->ReportError();

e->Delete();

m_db.Rollback();

}

//////////////////////////////////////////////////////////

Thanx.

Browse pgsql-odbc by date

  From Date Subject
Next Message Merlin Moncure 2005-11-15 14:13:31 Re: psqlOdbc Ansi + BDE issues
Previous Message noreply 2005-11-15 10:56:57 [ psqlodbc-Bugs-1000416 ] Tables not shown when linking from Access to the server. Prior drivers worked.