View Issue Details

IDProjectCategoryView StatusLast Update
0038720pas2jsrtlpublic2021-04-12 16:19
Reporterhenrique Assigned ToMichael Van Canneyt  
PrioritynormalSeverityminorReproducibilityalways
Status resolvedResolutionno change required 
PlatformPas2JsOSWindows 
Summary0038720: Active record problems
DescriptionWhen I open a DataSet, I close, and Try to open the various FActiveRecord again, it gets the negative value because it is updated when the buffers are updated. I can't tell you why i said it, but it's incorrect.
TagsNo tags attached.
Fixed in Revision
Attached Files

Activities

henrique

2021-04-07 21:01

reporter  

0001-Removido-a-implementa-o-do-active-record-no-dataset.patch (893 bytes)   
From d9d6182e99ce06a0f410885d397101e5585b9be9 Mon Sep 17 00:00:00 2001
From: Henrique Gottardi Werlang <henriquewerlang@hotmail.com>
Date: Thu, 11 Mar 2021 14:47:57 -0300
Subject: [PATCH] =?UTF-8?q?Removido=20a=20implementa=C3=A7=C3=A3o=20do=20a?=
 =?UTF-8?q?ctive=20record=20no=20dataset.?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

---
 packages/fcl-db/db.pas | 1 -
 1 file changed, 1 deletion(-)

diff --git a/packages/fcl-db/db.pas b/packages/fcl-db/db.pas
index fcc35e18..18e93baa 100644
--- a/packages/fcl-db/db.pas
+++ b/packages/fcl-db/db.pas
@@ -3753,7 +3753,6 @@ begin
       begin
       for i := 0 to (FActiveRecord-Value) do
         ShiftBuffersBackward;
-      FActiveRecord := Value -1;
       end;
   SetLength(FBuffers,Value+1); // FBuffers[FBufferCount] is used as a temp buffer
   FBufferCount:=Value;
-- 
2.31.1.windows.1

henrique

2021-04-07 21:01

reporter   ~0130160

Fix attached.

Michael Van Canneyt

2021-04-07 22:42

administrator   ~0130166

Can you please create a small program that demonstrates the issue ?

The activebuffer code is the same as in FPC, I have many tests in place for this,
so I would be really surprised to learn that this is a bug.

henrique

2021-04-12 15:43

reporter   ~0130308

So...

I change the implementation of my dataset an everything is working just fine, so you can close this issue.

Michael Van Canneyt

2021-04-12 16:19

administrator   ~0130312

Closing as requested

Issue History

Date Modified Username Field Change
2021-04-07 21:01 henrique New Issue
2021-04-07 21:01 henrique File Added: 0001-Removido-a-implementa-o-do-active-record-no-dataset.patch
2021-04-07 21:01 henrique Note Added: 0130160
2021-04-07 22:42 Michael Van Canneyt Assigned To => Michael Van Canneyt
2021-04-07 22:42 Michael Van Canneyt Status new => feedback
2021-04-07 22:42 Michael Van Canneyt Note Added: 0130166
2021-04-12 15:43 henrique Note Added: 0130308
2021-04-12 15:43 henrique Status feedback => assigned
2021-04-12 16:19 Michael Van Canneyt Status assigned => resolved
2021-04-12 16:19 Michael Van Canneyt Resolution open => no change required
2021-04-12 16:19 Michael Van Canneyt Note Added: 0130312