Page 1 of 1

Documentation and Examples and C++ Builder

Posted: Sat 01 Nov 2008 18:13
by joepasquariello
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

Posted: Tue 04 Nov 2008 14:23
by Dimon
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.

Documentation and Examples and C++ Builder

Posted: Tue 04 Nov 2008 15:47
by joepasquariello
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]

Posted: Wed 05 Nov 2008 11:38
by Dimon
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.

NonBlocking Option

Posted: Thu 06 Nov 2008 19:09
by joepasquariello
Hello Dimon,

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

Joe