Documentation and Examples and C++ Builder

Discussion of open issues, suggestions and bugs regarding SDAC (SQL Server Data Access Components) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
joepasquariello
Posts: 38
Joined: Wed 16 May 2007 01:12

Documentation and Examples and C++ Builder

Post by joepasquariello » Sat 01 Nov 2008 18:13

Hello,

I'm using SDAC with C++Builder 2007, and I'm trying to learn more about SDAC and how to use it. Do you have any demo programs at all for C++ Builder, or any documentation that describes the demo programs?

Just as one example, I'd like to understand more about the NonBlocking option and how it uses threads. The help for that Property is one sentence, and I can't find any additional information. Do you guys have any manuals or guides that you can share with customers?

Thanks,

Joe

Dimon
Devart Team
Posts: 2885
Joined: Mon 05 Mar 2007 16:32

Post by Dimon » Tue 04 Nov 2008 14:23

You can use SDAC Help. You can learn SDAC functionality using Delphi demos, compiling with dcc32.
You can find the demo projects descriptions in the "Demo Projects" and the "Getting Started" topics of SDAC Help.

You can find detailed information about the NonBlocking option in description of the TCustomMSDataSet.Options property of SDAC Help.

joepasquariello
Posts: 38
Joined: Wed 16 May 2007 01:12

Documentation and Examples and C++ Builder

Post by joepasquariello » Tue 04 Nov 2008 15:47

Hello Dimon,

There is no non-blocking option in MSCustomDataSet.Options. The only Help entry I have found for the NonBlocking property is in TMSSQL, shown here:

property NonBlocking: boolean;

Description

Set the NonBlocking option to True to execute a SQL statement
in a separate thread.

Is that the help you mean? If there is more somewhere else, can you please tell me where? Finally, would it really be that difficult for you guys to provide the example programs for C++ Builder?

Thanks,

Joe
[/b]

Dimon
Devart Team
Posts: 2885
Joined: Mon 05 Mar 2007 16:32

Post by Dimon » Wed 05 Nov 2008 11:38

In the description of the TCustomMSDataSet.Options property in SDAC Help is said:
Set the NonBlocking option to True to fetch rows in a separate thread. The BeforeFetch event is called in the additional thread context that performs data fetching. This event is called every time on the Fetch method call. The AfterFetch event is called in the main thread context only once after fetching is completely finished.
In NonBlocking mode as well as in FetchAll=False mode an extra connection is created. When setting TCustomMSDataSet.Options.NonBlocking to True, you should keep in mind that execution of such queries blocks the current session. In order to avoid blocking, OLE DB creates an additional session as in TCustomMSDataSet.FetchAll = False mode. It causes the same problems as in TCustomDADataSet.FetchAll = False mode. This problem can be solved by using MARS (TMSConnection.Options.MultipleActiveResultSets = True). The current session is not blocked and OLE DB is not required to create addition session to run a query. MARS is supported by SQL Server 2005 only if SQL Native Client as OLE DB provider is used.

joepasquariello
Posts: 38
Joined: Wed 16 May 2007 01:12

NonBlocking Option

Post by joepasquariello » Thu 06 Nov 2008 19:09

Hello Dimon,

I'm using SDAC 4.30. Is this a new option (and updated help) in the latest release?

Joe

Post Reply