views:

299

answers:

2

Hello I have a ASP.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.

+1  A: 

The ASP.NET website has a wealth of examples.

http://www.asp.net/learn/data-access/

Robert Harvey
A: 

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.

Dan Diplo