Create for table in Schema Modeler custom SQL statement that will return all necessary data. In this no need to change server and client code.
On the server side implement DataService’s virtual method GetData to create custom resultset and return it to user. In this case on the server side it is possible to establish data you need and get it on the client side as usual.
What approach is better for your? Can you explain your case, when you need to fill custom data?
What do you mean with implementing GetData Method ?
Isn’t it already implemented ?
Maybe should i override it ?
Yes, this method is virtual and you can override it. Also you can use custom method to get data. So, the steps to solve the problem are the next:
Open .RODL file and create new operation (f.e. MyCustomGetDataMethod) for DataService with string input parameter “TableName” and Binary Result. If you want to override GetData method then skip this step.
Add for example the next implementation for the method MyCustomGetDataMethod:
I’m searching something like ExportedDataTables in Delphi DA server.
Is it possible in .NET ?
No, RemObjects DataAbstract for .NET doesn’t contain this functionality.
After more than month working on another project, i came back to problem we discussed.
Your suggestion creating custom GetData method is nice and simple, but is not universal. I need to change RemoteDataAdapter properties.
If i take overriding GetData method then this solution will work with all supported clients like delphi, js and ODATA. Agree ?
First i need to know what methods i need to override for retriving data.
Are getData and getSchema enought ?
Are there any sample project that could help me ?
getSchema returns schema definitions in XML format ?
Is there any documentation how schema is defined in XML ?
If i take overriding GetData method then this solution will work with all supported clients like delphi, js and ODATA. Agree ?
GetData method is used to retrieve data. So, if you override it then all types of clients (delphi, js, odata) will call overriden method to retrieve the data.
First i need to know what methods i need to override for retriving data.
Are getData and getSchema enought ?
Are there any sample project that could help me ?
You need to override getData method. getSchema returns the schema referenced by the service to the calling client application. So no need to override getSchema method if you only need to retrieve the data. As example please use code snippet above but change MyCustomGetDataMethod definition to GetData method definition.
getSchema returns schema definitions in XML format ?
Yes, getSchema returns result in XML format.