Print Page | Close Window

AspDataSource DB update

Printed From: IdeaBlade
Category: DevForce
Forum Name: DevForce Classic
Forum Discription: For .NET 2.0
URL: http://www.ideablade.com/forum/forum_posts.asp?TID=1518
Printed Date: 18-Oct-2025 at 10:38pm


Topic: AspDataSource DB update
Posted By: vinothvdp
Subject: AspDataSource DB update
Date Posted: 09-Oct-2009 at 5:45am

Hi,

As per you ASP.NET Apps Using AspDatasource example how can update the entities to DB, now these all changes are happen on local cache only. pls help me  how to Create /update /delete on DB some like windows forms PersistenceManager.SaveChanges method. if you have any example send it me.

Thank you,
Vinoth Kumar.K



Replies:
Posted By: davidklitzke
Date Posted: 14-Oct-2009 at 3:58pm
You should be able to use PersistenceManager.SaveChanges().   You can add this single line of code at the end of InsertEntity, DeleteEntities, and UpdateEntity.  This is mentioned in the documentation in the section on UpdateEntity.
 
Your other alternative is to add a Save button to the form and only save the changes when the user presses the Save button.



Print Page | Close Window