HI,
I have created a wizard control to collect user informations.
First step : Personal informations
Step Two : Educational informations
After user completed and click finish button I want to add Personal informations to 'Personal' table in my sql server database.
And also Educational information in to 'Educational' table.
Using Stored Procedure (here it is)
CREATE PROCEDURE dbo.StoredProcedure1
@.Fname varchar(10),
@.Lname varchar(10),
@.Email varchar(50),
@.Tel varchar(20)
AS
INSERT INTO Personal (Fname, Lname, Email, Tel)
VALUES (@.Fname, @.Lname, @.Email, @.Tel)
RETURN
So Now I want to add another stored procedure for Educational table.
How do I do this.Should I modify this.
But Educational info should goes to 'Educational' table not to 'Personal'
How do I chieve this.
Thanks
I do not know how much information you have from another step, but you can do everything in one stored procedure call. Just add parameters from your next wizard step and do insert into 2 tables at one shot in one stored procedure with two insert statement. This way you can link this records if you have any relations between your tables.
Thanks
No comments:
Post a Comment