|
|
|||||||||
|
|||||||||
|
|||||||||
| |
|||
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Display Modes |
|
#1
|
|||
|
|||
|
Hi All,
I need some help with my problem. I need to be able to store 2 different data in 2 different tables same database. I have a function called update button. When i clicked update, i need to be able to store (ItemID, Name and last name in 'Main' table, and Property i need to save in 'property'Table. But i only allow to click update once so it will update both. I dont know how to call 2 stored procedure in one function. I attach the code here. Thanks in advance. PrivateSub UpdateBtn_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles updateButton.Click, If Page.IsValid = TrueThen Dim propertyID AsString = "" Dim propertyItem As ListItem ' loop through the CheckBoxList ForEach propertyItem In companyproperty.Items If propertyItem.Selected = TrueThen propertyID = propertyID & propertyItem.Text '& ";" EmployeesBiz.AddProperty(propertyID) -----> i tried to call it here but it wont work( EmployeeBiz is my vb code, addproperty is my stored procedure) EndIf Next Try ' Update the Employee information within the Employees table EmployeesBiz.UpdateEmployee(itemId, FirstNameField.Text, LastNameField.Text) ' Redirect back Response.Redirect(CType(ViewState("UrlReferrer"), String)) Catch exc As Exception lblError.Text = "Update failed. Please check the values you entered. (" & exc.Message.ToString() & ")" EndTry EndIf EndSub |
![]() |
| Viewing: Dev Articles Community Forums > Programming > .NET Development > stored data in 2 different table with 2 different stored procedure |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|