Forum > Database

tbufdataset.CopyfromDataset - strange behaviour in Lazarus trunk version

(1/3) > >>

I noticed that some my code could not copy data properly using copyfromdataset method.
The same code works perfectly if I compile it using the stable version of Lazarus but not in the trunk version.  Please see attached pix and sample code.
What are the new changes/requirement for tBufdataset?


--- Quote from: kjteng on November 01, 2021, 10:07:58 am ---Please see attached pix and sample code.

--- End quote ---
Sample code seems to be missing. OK - you added it.

Since the code of TBufDataset belongs to the FCL it is probably the FPC version which makes the difference. Please specify your Lazarus and, most of all, FPC versions.

I do not understand the screenshots. What is their difference?

At first trying your project with Laz/main+fpc3.2.2 and with Laz 2.0.12/fpc3.2 I saw significant differences between the left and right dbgrids, just like in your second screenshot. But then I noticed that the left grid, upon copying the data, has scrolled to the end while the right grid is at the top of the data. Bringing them in sync removes the differences.

Sorry for not being clear in my previous post.

The first pix (screenshot (27)) is the result from the trunk version whereas the other pix is from the stable version.

In the trunk version, 'PART' column does not display the correct numbers. For example, the original part number was 0 (in the querydataset and table), but shown as -72057594037927934 in the bufdataset.

I am using the following:
   Trunk version2.3.0 date 2021-10-30, FPC ver 3.3.1
   Stable version2.0.12 date 2021-02-21,  FPC ver 3.2.0, SVN 64642

Moving to FPC 3.3.1 I see the issue now, and you should report the issue. But the sample project is still too complex for a report, it should be simplified: Remove the dependence on ZEOS, or maybe even move to a simple memory-based dataset as data source. Ideally even the dependence on Lazarus should be removed. Normally, when doing so, additional information about the bug is revealed.

I now replaced ZEOS by TSQLite3Connection/TSQLTransaction/TSQLQuery which come with Lazarus, and - voila - the error is gone...

Therefore I'd say that the issue is not an issue of TBufDataset.CopyFromDataset, but an issue somewhere in ZEOS. Please report it to the ZEOS forum.


[0] Message Index

[#] Next page

Go to full version