Page 1 of 1

concurrency options in SDAC?

Posted: Wed 23 May 2007 08:07
by Ludek
Using ADO, I can set currency options using LockType property of Recordset object, in ODBC I have stament attribute SQL_ATTR_CONCURRENCY. How can I do this using sdac? thx.

ADO applications

Specify adLockReadOnly, adLockPessimistic, adLockOptimistic, or adLockBatchOptimistic in the LockType property of a Recordset object.


ODBC applications

Set the statement attribute SQL_ATTR_CONCURRENCY to SQL_CONCUR_READ_ONLY, SQL_CONCUR_ROWVER, SQL_CONCUR_VALUES, or SQL_CONCUR_LOCK.
[/code]

Posted: Wed 23 May 2007 13:52
by Jackson
As SDAC uses OLE DB, it doesn't support such functionality.

Posted: Thu 24 May 2007 08:49
by Ludek
I'm sorry, I don't understand. OLE DB should be a replacement and successor for ODBC - does it then mean, that OLE DB does not implement all options of its predecessor? Also ADO is only a higher-level API to OLE DB. So, I assume, the OLE DB should have such functionality... Or am I somehow wrong? :roll:

Posted: Thu 24 May 2007 08:59
by Ludek
I can even read following:

Microsoft SQL Server 2005 supports a range of concurrency control. Users specify the type of concurrency control by selecting transaction isolation levels for connections or concurrency options on cursors. These attributes can be defined using Transact-SQL statements, or through the properties and attributes of database application programming interfaces (APIs) such as ADO, ADO.NET, OLE DB, and ODBC.

source:
http://msdn2.microsoft.com/en-us/library/ms189132.aspx

Posted: Fri 25 May 2007 08:17
by Jackson
In OLE DB you can specify the type of concurrency control by selecting transaction isolation levels for connections, or/and cursor type for record sets.