Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.
Private Sub TreeView1_AfterSelect(sender As Object, e As TreeViewEventArgs) Handles TreeView1.AfterSelect Dim con As New SqlConnection Dim cmd As New SqlCommand Dim frm As New Form con.ConnectionString = "Data Source=myServer;Initial Catalog=myDB;Integrated Security=True" con.Open() cmd.Connection = con If e.Node.Text = "PM App" Then Exit Sub Else cmd.CommandText = "SELECT FormName FROM Menu WHERE Application = @Form" cmd.Parameters.AddWithValue("@Form", TreeView1.SelectedNode.Text) frm = cmd.ExecuteScalar() frm.Show() con.Close() End If End Sub
Add your voice to the tech community where 5M+ people just like you are talking about what matters.
Join the community of 500,000 technology professionals and ask your questions.