Hey all, I need some help deleting data from a database using a treeview. What I mean is that I have a treeview that is generated from a DB, I want to give the user the option of deleting right from the treeview by selecting the node and the clicking the delete button. I have three different treeviews, but they do share links, so i have 3 different buttons set up and have different code set up based on which event is triggered. The code is basically the same throughout but each one, but based on the level they may have more to delete.

Code Example: this is the aspx.vb code
Dim ControlID As Int32 = CInt(tvADMSInfo.SelectedNode.Value.ToString())
Common.DeleteScreen(ControlID)

Dim HelpLinkID As Int32 = CInt(tvHelpContents.SelectedNode.Value.ToString())
Common.DeleteLink(HelpLinkID)

Dim HelpContentID As Int32 = CInt(tvContent.SelectedNode.Value.ToString())
Common.DeleteContent(HelpContentID)
PopulateList()

Also have this in the App_Code, Common.VB file
Public Shared Function DeleteScreen(ByVal ControlID As Int32) As Boolean
Try
Dim CS As String = System.Configuration.ConfigurationManager.ConnectionStrings("CS").ToString
Dim oParams(1) As OracleParameter

oParams(0) = New OracleParameter("return", OracleDbType.Int32, ParameterDirection.ReturnValue)

oParams(1) = New OracleParameter("p_ad_help_link_id", OracleDbType.Int32, ParameterDirection.Input)
oParams(1).Value = ControlID

OracleHelper.ExecuteNonQuery(CS, CommandType.StoredProcedure, "ad_help.deletescreen", oParams)
If CInt(oParams(0).Value) = 1 Then
Return True
Else : Return False
End If
Catch ex As Exception
Return False
End Try
End Function

Once the event is trigger the aspx.vb code runs, and sends the data to the common.vb which then sends that data to a PL/SQL page which runs the PL/SQL, this code is pretty simplistic.

What happens is either it deletes the wrong data, or nothing at all, it runs the code, but will not throw any errors, just says done. It seems that if I only have one piece of data in the DB it works fine, but does not run though the code completely, will delete the first piece of data then just does nothing, also i can not go in to other 2 delete events i have and delete the data cause it just runs the code and reloads the page without deleting anything. Thanks for any help you guys can provide