v-wywang
4/3/2008 8:53:00 AM
Hello Chuck,
Thanks for your reply.
Actually, dc.SubmitChanges() method doesn't reload the edited objects. This
method just generates Update Query for SQL Database. It doesn't query
edited objects from database after updating. This behavior is different
from DBAdapter. In DBAdapter senarior, Adapter will retrieve rows from
database after updating. In Ling to SQL scenario, if you want to reload
objects after SubmitChanges method, you can use dc.Refresh() methd.Because
you have set load options for dataContext, Child rows will be reloaded
automatilly.
For Example:
dc.SubmitChanges();
dc.Refresh(RefreshMode.OverwriteCurrentValues, dc.jobs);
But, this method maybe very slow, because it refreshs row by row.
Hope this helps. Please feel free to let us know if you have any more
concern. We are glad to assist you.
Have a great day,
Best regards,
Wen Yuan
Microsoft Online Community Support
Delighting our customers is our #1 priority. We welcome your comments and
suggestions about how we can improve the support we provide to you. Please
feel free to let my manager know what you think of the level of service
provided. You can send feedback directly to my manager at:
msdnmg@microsoft.com.
==================================================
This posting is provided "AS IS" with no warranties, and confers no rights.