TXDataset and autoapply

Hi , i'm trying to use RemoteDBDatabase in a client FMX application for android. I've created a server VCL  side application with your Wizard that access to firebird database.


In a client application i'm trying to update data to remote server using autoapply in a followed code : 

  Try
    DM1.dstCitta.AutoApply:=True;
    DM1.dstCitta.KeyFields:='Cod_Citta';

    DM1.rdbDati.BeginTransaction();

    If DM1.dstCitta.State In [dsEdit, dsInsert] Then
      DM1.dstCitta.Post();

    DM1.rdbDati.Commit();
  Finally
    DM1.dstCitta.AutoApply:=False;
    frmMain.UpdateGrid();
  End;

but nothing happen !! on the client record are updated but not on DB.... 

what i'm wrong ?

or is better to use events ?


hi any news for me ?

It should be working fine. I guess you could try to investigate it a little bit more:


1. Does it work in VCL Windows application?
2. Does it work without using transaction?
3. Try to assign TRemoteDBDatabase.OnRequestSending event and see if it's being triggered when you call Post
4. Use RemoteDB server-side events to log the SQL statements being executed and see if the SQL statement for the update is being executed.

1. Does it work in VCL Windows application?

i created a FMX application, VCL is the server

2. Does it work without using transaction?

No, same issue 

3. Try to assign TRemoteDBDatabase.OnRequestSending event and see if it's being triggered when you call Post

I dont see any OnRequestSending event, only afterconnect and beforeconnect

4. Use RemoteDB server-side events to log the SQL statements being executed and see if the SQL statement for the update is being executed.

i have a sql like this : UPDATE CITTA SET NOME = :TMS_UPDATE_NOME WHERE (COD_CITTA = :TMS_WHERE_COD_CITTA)

solved..  was FDConnection on the server with autocommit = false,  now go fine ! thx