Your webservice
connects to your database and you use SQLconnection
, SQLDataset
, and Datasetprovider
. In Commandtext
of your sqldataset
you entered something like
Select * from tabela where id =:id
In your mobile application, in your datamodule you put SQLConnection
, drive datasnap, DSProviderconnection
and even ClientDataSet
, in the object inspector of ClientDataSet
you set RemoteServer
pro tu DSProviderConnection
e no ProviderName
set your datasetprovider
there of your webservice
.
In Params you create a new paramenter with the name of id
, give it a value of 1 just to test, right-click on your clientdataset
and click on FieldsEditor
, click on right click on the white area of the new window and click on Add Fields
, if you load all the fields of the table it is signal that everything is ok by passing correct parameter, delete the value of the parameter created in your clientdataset
.
When you need to make a request using paramentro, just use:
ParamByName('id').AsInteger := 1;
To write the changed data that has been uploaded is that old story of Post
and ApplyUpDates()
Hope it was useful