Updating MS SQL table ?

I have managed to get my test program to work, showing the contents of one of the Aurelius entities in a WEBDBGrid and using a navigator, I can add, delete and edit entries in the grid.

BUT.. those operations are not propagated back to the table. Regardless of what I do to the data in the grid, the actual table in the DB, stays the same.

I have used the example from the Video "Databanken mit XData einbinden", but have selected MS SQL i stead of SQL lite, and the tables in my DB instead of the Verbs table in the video. Also, I have replaced the "Ansigen" button, with a load command in the form.show event. Otherwise it is the same.

So what am I missing ? I cannot see any properties, in any of the involved components, which would decide to keep changes local.

Could anyone point me in the right direction. An text example or video showing how to create an application, to be used for data manipulation in a SQL table, would be great and much appreciated. it could be in English, German or even French.



Soren:


Did you call ApplyUpdates on the XDataWebDataset component?

Please see XDataWebDatasetDemo in the Web Core/XData demo folder how to set everything up.

I followed your beautiful tutorial "TMS XData: Accessing any database with SQL queries via the TMS XData RESTserver".

Nevertheless I had to change a lot because I do not have FireDac that can access to MSSQL (which is what I need). So at first I used SQLite and it worked well. Then I had to get rid of all the Firedac staff and generate a TStream, better a TMemorystream, containing the data of a Dataset (I use UNIDAC) in Json format. To do that I used a component from Scalabium (SMExport component suite- Mike Shkolnik) to generate that Stream. It works well, also quite fast if you disable the user feedback on transforming the data.
The result from the browser was well promising, but the WebClientDataset did not want to play with.

Now I changed the codepage of the resulting streams from unicode to ANSI_WINDOWS and everything works fine. Please mention it somewhere in your next tutorials. Where can I look at which kind of coding the Json is and which kind of coding does WebClientDataset expects.

Thanks to the flexibility of the XDATA and WEBCore products I can now solve all my immediate problems with a minimum of effort. The best way would have been to use Aurelius, but I am not in such a lucky situation. The data I have to use is imported from a cloud system that offers no API. The only way to get the data is over some reports (EXCEL files) that has to be imported in MSSQL to generate some KPIs through Views and Stored Procedures. I don' t want to write the existing queries once more in Linq, I just want to access these views and procedures and functions to get the KPI on a WEB page on the intranet.So I cannot use Aurelius directly, I do not want to generate the classes per hand. This is now a nice and fast way to get the data from a rest server connected to MSSQL to a intranet page generated through WEBCore. Many thanks!

This is a mistake of mine. It has not much to do with this post. Please excuse me and delete my answer.

Hi Holger,

No, I have not noticed that. I'll give it a try and expects that is the solution.

Thanks,

Soren