Discussion of open issues, suggestions and bugs regarding ODAC (Oracle Data Access Components) for Delphi, C++Builder, Lazarus (and FPC)
-
tinu
- Posts: 1
- Joined: Wed 18 Jan 2012 15:11
Post
by tinu » Wed 18 Jan 2012 16:37
Hi
We updated to odac version 8.1.4.
Now we get Access violations when calling ApplyUpdates on a TOraQuery. Searching in this forum I found a thread with probably the same problem:
ChachedUpdates Error in 8.1.4
Could you tell us how to fix this in the code (DBAccess.pas)
Code: Select all
procedure TCustomDADataSet.ApplyUpdates(const UpdateRecKinds: TUpdateRecKinds);
var
//...
if UsedConnection.IsMultipleTransactionsSupported or
(FConnection.Options.DisconnectedMode and (AutoCommit = False))
^-- FConnection is nil
thanks
-
AlexP
- Devart Team
- Posts: 5530
- Joined: Tue 10 Aug 2010 11:35
Post
by AlexP » Thu 19 Jan 2012 09:29
Hello,
For fixing this problem, you should make the following changes in the MemData.pas module in the TMemData.ApplyUpdates method.
The following code
Code: Select all
finally
if OldCurrentItem.Flag = flUsed then
CurrentItem := OldCurrentItem;
end;
Change with
Code: Select all
finally
if (OldCurrentItem = nil) or (OldCurrentItem.Flag = flUsed) then
CurrentItem := OldCurrentItem;
end;
-
wraaflaub
- Posts: 4
- Joined: Mon 01 Mar 2010 10:16
Post
by wraaflaub » Wed 25 Jan 2012 15:30
Hello,
we tried the above fix, but with no success. Instead we changed the following line in DBAccess in TCustomDADataSet.ApplyUpdates from:
Code: Select all
(FConnection.Options.DisconnectedMode and (AutoCommit = False))
to:
Code: Select all
(UsedConnection.Options.DisconnectedMode and (AutoCommit = False))
This seemed to work.
Cheers,
Walter
-
AlexP
- Devart Team
- Posts: 5530
- Joined: Tue 10 Aug 2010 11:35
Post
by AlexP » Thu 26 Jan 2012 09:40
Hello,
The code I have performed fixes the problem with the ApplyUpdate call for an empty DataSet, if you face this problem in an other situation, please perform a code abstract, which causes the error, or send a sample reproducing the problem to alexp.devart.com
-
vassot
- Posts: 5
- Joined: Mon 13 Feb 2012 08:09
Post
by vassot » Mon 13 Feb 2012 08:27
Hello, I have the same problem (AccessViolation at ApplyUpdates) with odac version 8.1.4. but I do not have the source code. How can I fix this?
-
AndreyZ
Post
by AndreyZ » Wed 15 Feb 2012 15:48
This fix will be included in the next ODAC build. We plan to release new builds of all DAC components as soon as RAD Studio XE2 Update 4 is released. This way, we will be able to provide all DAC components compatible with the new update.
-
vassot
- Posts: 5
- Joined: Mon 13 Feb 2012 08:09
Post
by vassot » Thu 22 Mar 2012 09:53
I still get an access violation at ApplyUpdates. I have setup Delphi Xe2 Update 4 and odac 8.1.5. Please tell me what might have gone wrong.
-
AlexP
- Devart Team
- Posts: 5530
- Joined: Tue 10 Aug 2010 11:35
Post
by AlexP » Thu 22 Mar 2012 11:56
Hello,
Please provide us a piece of code where the error arises.
-
vassot
- Posts: 5
- Joined: Mon 13 Feb 2012 08:09
Post
by vassot » Fri 23 Mar 2012 09:56
I am sorry for my previous message. I was getting an access violation because my dataset's session property was blank.
-
AlexP
- Devart Team
- Posts: 5530
- Joined: Tue 10 Aug 2010 11:35
Post
by AlexP » Fri 23 Mar 2012 13:49
Hello,
Glad to see that the problem was solved. If you have any other questions, feel free to contact us.