New Transaction not allowed ...

Discussion of open issues, suggestions and bugs regarding SDAC (SQL Server Data Access Components) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
LHSoft
Posts: 104
Joined: Sat 18 Aug 2012 08:33

New Transaction not allowed ...

Post by LHSoft » Thu 29 May 2014 10:54

Hello,

I have a form with some TMSTables, one of them is in a notification, this notification works.
But when I want to edit one of the other tables (not in notification) within a complex procedure, I get the errormessage (translated):
"a new Transaction is not allowed, cause there are other threads in this session. errortype: EMSError"

I do not work with transactions or threads in this procedure.
When I do not use the notification on this form, there is no error.

Can you give me a tip, what might be the reason of this error?

best regards
Hans

azyk
Devart Team
Posts: 1057
Joined: Fri 11 Apr 2014 11:47
Location: Alpha Centauri A

Re: New Transaction not allowed ...

Post by azyk » Fri 30 May 2014 09:41

Hello,

We couldn't reproduce the problem. Please send us a complete small test project to reproduce the problem.

LHSoft
Posts: 104
Joined: Sat 18 Aug 2012 08:33

Re: New Transaction not allowed ...

Post by LHSoft » Fri 30 May 2014 13:31

Hello azyk,

I have sent you a small demo by email (test.zip).
The error appears in the OnShow-Event when saying:
TbStmKun.Edit;

2 Tables should be created in the database you select with Login.
I use SQLServer express 2008
SDAC 6.19
XE5

thanks
Hans

LHSoft
Posts: 104
Joined: Sat 18 Aug 2012 08:33

Re: New Transaction not allowed ...

Post by LHSoft » Sat 31 May 2014 01:53

Hello,

one change in test project:

So the error occurs there need to be data in the table
TbLagKas
.
I have sent you an email with the downloadlink to a populated database.

best regards
Hans

azyk
Devart Team
Posts: 1057
Joined: Fri 11 Apr 2014 11:47
Location: Alpha Centauri A

Re: New Transaction not allowed ...

Post by azyk » Tue 03 Jun 2014 11:37

Hello,

We investigated the provided code sample. This problem occurs not due to using TMSChangeNotification. The reason is an open dataset with non-fetched data, and the application opens another dataset and attempts to start a transaction. Transaction start is denied in this case, even if MultipleActiveResultSets is True.

You can read the discussion of this issue at http://blogs.msdn.com/b/cbiyikoglu/arch ... -3983.aspx

Post Reply