Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Clientdataset error "must apply updates before refresh"

Status
Not open for further replies.

kyriakos70

Programmer
Jul 24, 2008
87
GR
Hello,
I have created an application in BDS 2006 and SQL Server 2005, it is a multitier application. On the server side I used ado connection (provider sqlncli not sql oledb). On the client side I have socket connection and clientdataset.
My problem is that I can't delete records, when I do any other operation eg. (insert, update) works well but when I try to delete a record a message is showing "you must apply updates before refreshing data" I have put some code on a button to applyupdates but nothing any suggestions?

Thank you
Kyriakos

<code in navigation bar>
if ((btn=(nbdelete)) then
clientdataset1.ApplyUpdates(-1);
<code in navigation bar>

I insert the same code in a button but nothing when I try to delete the same error.
 
Hello again,
Something else I have the same client/server installed with the same configuration on a different pc and works correct only diference that I have sql server developer, maybe has something to do with the settings of the sql server any security settings?

Kyriakos
 
I don't know if this fits your problem or not, but remember that there may be two data structures using the Clientdataset. USing Update is different than ApplyUpdates. Google Cary Jensen who did a series of articles on Cleintdataset behavior. ( I believe it was at delphi.About.com)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top