Error When trying to perform edit operations

Discussion of open issues, suggestions and bugs regarding SDAC (SQL Server Data Access Components) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
Balaji
Posts: 20
Joined: Thu 05 Oct 2006 04:45

Error When trying to perform edit operations

Post by Balaji » Fri 13 Jul 2007 12:29

Hi,

I am using Licensed version(3.80) of SDAC components.

I am facing a problem when performing Certain Edit(Update and Delete) Operations. This problem is specific only in certain cases.

The sequence of operations on database will as follows:
1) There will certain set of Select Operations to validate the data user has entered
2) There will be certain Select Operations to determine whether user is in Edit mode or Add Mode
3) When the user is in Edit mode, he performs certain modifications to the data and accordingly dataset is updated.
4) Now when i Start the transaction to update the changes of dataset to the database i am getting the following message

"Error: Cannot create new transaction because capacity was exceeded."

I know that there can be some problem in my Code but i tried out various options and i couldnt find any success.

I am using Query an UpdateSQL components of SDAC for this purpose.

Can any one help me out in solving my problem.

Regards
Balajee

Antaeus
Posts: 2098
Joined: Tue 14 Feb 2006 10:14

Post by Antaeus » Mon 16 Jul 2007 12:35

It looks like transactions are open in many connections, and you have encountered an OLE DB restriction.
Try to trace using SQL Server profiler what actions lead to opening many connection.
Probably it will be enough to close unnecessary datasets in your applications.

Balaji
Posts: 20
Joined: Thu 05 Oct 2006 04:45

Post by Balaji » Mon 16 Jul 2007 12:46

Thanks for the reply,
But my problem got solved with a different Solution.

The FetchAll Property of SDAC query components which i was using was set to False. I have set the Property to TRUE and my problem got solved automatically.

Antaeus
Posts: 2098
Joined: Tue 14 Feb 2006 10:14

Post by Antaeus » Mon 16 Jul 2007 15:03

SDAC creates one more connection to server for each dataset opened in FetchAll=False mode. Setting FetchAll to True have decreased count of connections opened simultaneously. You have found a good solution for this problem.

cross_join
Posts: 13
Joined: Wed 11 Feb 2015 17:34

Re: Error When trying to perform edit operations

Post by cross_join » Fri 01 Apr 2016 08:44

"FetchAll = true" is not a good solution at all because the dataset load all table's data to client. It's very dangerous that this value is used by default.

AlexP
Devart Team
Posts: 5530
Joined: Tue 10 Aug 2010 11:35

Re: Error When trying to perform edit operations

Post by AlexP » Mon 04 Apr 2016 09:25

In the new SDAC versions, there was added smartfetch mode that allows to save memory on loading large data volumes. See more details in the documentation: https://www.devart.com/sdac/docs/?devar ... tfetch.htm

cross_join
Posts: 13
Joined: Wed 11 Feb 2015 17:34

Re: Error When trying to perform edit operations

Post by cross_join » Mon 04 Apr 2016 15:52

SmartFetch seems isn't working as expected with SQL Server
http://forums.devart.com/viewtopic.php?f=28&t=33458

AlexP
Devart Team
Posts: 5530
Joined: Tue 10 Aug 2010 11:35

Re: Error When trying to perform edit operations

Post by AlexP » Mon 11 Apr 2016 09:19


Post Reply