"Cannot modify a read-only dataset" error
If the rbItem table is empty, when saving a new report I get the error "Cannot modify a read-only dataset".
I thought it was some problem in my code, but it also occurs with the ".\4.EndUser Databases\NexusDB" if I delete all records from tbItem table.
I'm using RB 19.02 with Delphi Tokyo 10.2.3 and NexusDB 4.50.05.
My code worked correctly until version 18 of RB.
I thought it was some problem in my code, but it also occurs with the ".\4.EndUser Databases\NexusDB" if I delete all records from tbItem table.
I'm using RB 19.02 with Delphi Tokyo 10.2.3 and NexusDB 4.50.05.
My code worked correctly until version 18 of RB.
Comments
This appears to be a change in NexusDB. The latest version(s) of NexusDB altered the way values can be compared to an unassigned (NULL) value which causes access issues when reading or manipulating the ItemUpdate query.
To solve the issue, you can alter the ItemId parameter of the ItemUpdate query to have a default value and type so it is never returned as NULL. In my testing, an "Integer" value of 0 worked fine.
I will update the NexusDB demo to reflect this change for the next release of ReportBuilder.
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com
When I try to change or run a report I get the error "Formato de matriz inválido" (Invalid array format).
If I change default value for the parameter to "Unassigned" this error does not occur however I can not create reports if the table was empty.
Okay, let's go back to having an Unassigned parameter and alter the ItemUpdate SQL to handle the special case when there are no records in the dataset. In my testing this allowed me to create reports when the rbItems table was empty and alter existing reports without issues. Let me know if it works for your application.
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com
Your suggestion solved this issue.
Thank you.