
I want To Update Multiple Table. It's Taking To Much Time, Some Time Memory Problem. Is There Are Any Solution For That?

Know the answer? Post it. Somebody with the same question will find it here.
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questions
DevSocialUpcoming · 3rd editionAI Agents ConferenceDec 1–3, 2026Live onlineFree to attend5days leftRegister
Shivanand ArurRank #920 · 2.3K reputationPosted Oct 19, 2012, 5:04 AM EDT
And then call the Stored Procedure from the Code... Take a look at this Example....
I have 2 tables - Tbl_MemberUser and Tbl_AdminUser
Columns in Tbl_MemberUser -
MemID MemName MemPass MemAddr
1 Shiv shiv@pass Mumbai
2 Anand anand@pass Delhi
Columns in Tbl_AdminUser
AdmID AdmName AdmPass AdmAddr
1 Admin1 adm1@pass Mumbai
2 Admin2 adm2@pass Kolkata
--------------------------------------------------------------------------------------
Now I want to update these tables from the Stored Procedure...
Create Procedure Update_Members
(
@iMemID int,
@iAdmID int,
@sMemAddr varchar(50),
@sAdmAddr varchar(50),
)
AS
BEGIN
UPDATE Tbl_MemberUser SET MemAddr = @sMemAddr where MemID = @iMemID
UPDATE Tbl_AdminUser SET AdmAddr = @sAdmAddr where AdmID = @iAdmID
END
--------------------------------------------------------------------------------------
Now I'll write my code like this...
protected void btnUpdate_Click(Object sender, EventArgs e)
{
}
This may not be a proper example, since I am trying to pass the ID, but you can just relate the code and try to change yours!!! Hope this helps you out.
PLEASE MARK THE ANSWER AS ACCEPTED IF IT HELPED!!!
Sudhakar ChaudharyRank #1,379 · 1.2K reputationPosted Oct 19, 2012, 7:34 AM EDT