Reputation:
net page with lot of controls and validations. I need to allow users to Save the application into the database.
I have a Master table Called Customer and 5 different child tables with Customer_ID being foreign key.
Once the user hits save I need to insert a record into customer table and then insert records into relevent child tables with the just created customer_ID.
Can you guys suggest me a good example of the above mentioned scenario that would be of great help.
I created a model for Customer and all the child tables. But I really don;t know how to proceed from here.
I am using VB.net and ASP.net 2.0 and oracle 8g. We cannot use the ASP.net 3.5 or MVC 1.0.
Please help
Thanks a ton.
Upvotes: 0
Views: 1260
Reputation: 25339
One thing I would definitely do is make sure you use transactions to ensure data integrity. The transactions could be within a stored procedure or using the .NET transaction classes. Either way, you want to make sure that if there is an exception when saving your data that the database is rolled back to a consistent state.
Upvotes: 1
Reputation: 180787
The ASP.NET website has a wealth of examples.
http://www.asp.net/learn/data-access/
Upvotes: 1