Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Serialization of TDataSet with different Fields and FieldDefs #30

Open
dimitar-grigorov opened this issue May 18, 2022 · 0 comments
Open

Comments

@dimitar-grigorov
Copy link

I have found a bug in OmniXMLDatabase.pas.

It occurs when .Fields and .FieldDefs collections of TDataSet have different member count and type. A typical case when that happens is when calculated or lookup fields are created only in FieldDefs collection.

In general when TFieldDef is created, immediately after that TField is created. But when that`s not the case a "Index out of bounds" exception is raised in methods XMLNodeToDatasetRow and DatasetRowToXMLNode.

I have created a branch with a Delphi project which cloud be used to reproduce the problem. TdxMemData and TClientDataSet are used for comparison.

I had a problem when I used the methods mentioned above with TdxMemData which is in-memory dataset from DevExpress.
Also I have commited a potential fix for the bug.

If you need more information or more tests with different TDataSet descendants, I will provide more ;)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant