Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Save using table other than primary table
Message
General information
Forum:
ASP.NET
Category:
The Mere Mortals .NET Framework
Title:
Save using table other than primary table
Environment versions
Environment:
C# 2.0
OS:
Windows Server 2003
Network:
Windows 2003 Server
Database:
MS SQL Server
Application:
Desktop
Miscellaneous
Thread ID:
01391515
Message ID:
01391515
Views:
81
I have a form that shows all the records for an individual in a grid bound to the primary table of my business object, PtSavings. On another tab, I have a record that references some of those records, based on a foreign key, BatchId. Based on certain actions, I want to update the SavingStatus column for those rows that have a certain BatchId. I first tried doing this by a method in my business object that just selects the rows for the specified individual and BatchId into a secondary table. I used BizObject.TransactionBegin, etc. to make the changes on all the rows in the batch and commit the transaction if everything is updated and saved. The changes were made and the transaction committed. I checked the DataSet and the values were correct in the secondary table. However, when I refreshed the primary table, it did not have the changes, nor were the changes saved to SQL Server.

I changed the code to reference the primary table and just skip over the rows that don't match the specified BatchId and everything works correctly. I can't figure out why things don't work using the secondary table. The only thing I can figure is that it must update from the secondary table and then overwrite those changes with the rows from the primary table when doing the bizform.Save(BizObject), since you can't specify a table name on the Save(). Is there a way to make this work with the secondary table?

Thanks.
Linda Harmes
HiBit Technologies, Inc.
Reply
Map
View

Click here to load this message in the networking platform