concurrency options in SDAC?

Discussion of open issues, suggestions and bugs regarding SDAC (SQL Server Data Access Components) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
Ludek
Posts: 301
Joined: Thu 12 Oct 2006 09:34

concurrency options in SDAC?

Post by Ludek » Wed 23 May 2007 08:07

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]

Jackson
Posts: 512
Joined: Thu 26 Jan 2006 10:06

Post by Jackson » Wed 23 May 2007 13:52

As SDAC uses OLE DB, it doesn't support such functionality.

Ludek
Posts: 301
Joined: Thu 12 Oct 2006 09:34

Post by Ludek » Thu 24 May 2007 08:49

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:

Ludek
Posts: 301
Joined: Thu 12 Oct 2006 09:34

Post by Ludek » Thu 24 May 2007 08:59

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

Jackson
Posts: 512
Joined: Thu 26 Jan 2006 10:06

Post by Jackson » Fri 25 May 2007 08:17

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.

Post Reply