TXDataWebDataSet 'data undefined' error

I use TXDataWebDataSet.Insert(); to insert records. First time go fine.. at second time i have :
Cannot set property 'data' of undefined at Object.InternalInitRecord ....

heppen if i close and reopen dataset with persistent fields in it . ..

If i do :
//wdGraf.Close(); // il close da errore : Cannot set property 'data' of undefined at Object.InternalInitRecord ....

else if i do :
While Not wdGraf.IsEmpty() Do wdGraf.Delete(); GO FINE !

Why ??

Please provide a sample project we can compile and reproduce the problem here. Hard to guess what's going on.

Is there any solution for this?
I am having the same problem with inserting record second time. after closing and opening dataset.

We have no idea of the problem or how to reproduce it. We need a sample project with steps to reproduce the problem.

Here more informations


If you can go to this page : RISTORD by Megagest

enter with user : demo , pwd : demo

click 'Fai un ordine' (open dataset) then click on 'Indietro' (close dataset), click again on 'Fai un ordine' then on message 'No' -> error happen

At the end the error happen when i close and reopen the XDataWebDataSet without close connection.
If i close connection too solve the problem

I can't reproduce the issue. There is no button "Indietro" after I click "Pai un ordine". Please, clean up your code, isolate the problem, and send us a reproducible problem. That's part of the process of your learning the framework and debugging your application.

Ristord.zip (2.6 MB)

Attached very minimal project (IMPORTANT file is RAR archive) : try to click "Fai un ordine" and click again and see the error with debug F12

"Fai un ordine" fire procedure DM0.CreaModOrdine(...) as show in image and i think the problem is on the red hand circle ...


It's missing files MainUnit.pas and InternetUnit.pas.

Lib_WEB.zip (3.0 KB)

Sorry .... file is always RAR

Thank you. Why don't you send in ZIP format? It's the standard compressing format and prevent you and us manually changing the file extension.

you rigth but with RAR i manage many compressed format. Maybe you can add .rar ext to file upload ? :)

Well, the reason it's a not accepted extension is exactly because we want to receive compressed files in .zip format.

I receive a compilation message:

[Error] Main.pas(51): Duplicate identifier "JS"

Are you sure this is the correct project and that you tested it properly?

yes to me go fine


actually in Main.pas try to remove JS from second "uses" where say : uses JS, d_DM0;

So, you compiled fine even without removing JS in the second uses clause?

Sorry, cannot reproduce:

->So, you compiled fine even without removing JS in the second uses clause?
just tryed go fine too
->Sorry, cannot reproduce:
have you click 2 times "Fai un ordine"? click 1 time ... wait a bit... click again

Sorry, I didn't understand. How can you be sure that I'm using the same source code as you are using, if mine doesn't even compile?

Yes, did you watch the video? You can see many requests being made.