Using: Delphi XE2 Enterprise, UniDAC 6.0.1 Professional, Firebird 2.5.3
I have a TClientDataSet linked to a UniStoredProc which has its Update SQLs for INSERT and UPDATE set (to corresponding database stored procedures). The DataSetProvider has ResolveToDataSet set to True.
In my application when I call ClientDataSet.ApplyUpdates it works for INSERTs. (I'm inserting data into a DBGrid that is linked to the ClientDataSet).
However when updating data in grid, ClientDataSet.ApplyUpdates does not work. When checked with DBMonitor, it shows that the SELECT stored procedure to which the client dataset is linked is being called.
Not sure what to do.. how to resolve this? I need it (ApplyUpdates) to call the Update stored procedure that is set in the SELECT UniStoredProc's SQLUpdate property.
Problems with TClientDataSet.ApplyUpdates (UPDATE) when linked to UniStoredProc with update SQLs set
Re: Problems with TClientDataSet.ApplyUpdates (UPDATE) when linked to UniStoredProc with update SQLs set
Unfortunately, we could not reproduce the issue. Please send us a small sample to demonstrate the issue to viktorv*devart*com, including a script to create and fill in the test database object.
Re: Problems with TClientDataSet.ApplyUpdates (UPDATE) when linked to UniStoredProc with update SQLs set
Issue has been resolved. The reason the issue was happening is that the UPDATE SQL (of the SELECT stored procedure UniStoredProc) had a parameter that was not mapped back to a output column (ie. field) from the SELECT field list and this was causing it to fail.
Re: Problems with TClientDataSet.ApplyUpdates (UPDATE) when linked to UniStoredProc with update SQLs set
Glad to see that the issue was resolved. Feel free to contact us if you have any further questions about UniDAC.