Posted on: 2/24/2014 6:31:24 PM | Views : 562

All:  I am a DBA and not a programmer.  My code is below can you help clean up my mess...lol  Thanks

Protected Sub Button3_Click(ByVal sender As Object, ByVal e As EventArgs) Handles Button3.Click Dim myConn As SqlConnection Dim cmd As SqlCommand Dim sqlstring, Hostname As String
Hostname = TextBox13.Text

myConn = New SqlConnection("Data Source=SQLCLUSTER;Initial Catalog=SQLdefragRepository;Integrated Security=True")
myConn.Open()
sqlstring = ("Exec RemoveRecord").value = TextBox13.Text
cmd = New SqlCommand("RemoveRecord", myConn)
CommandType.StoredProcedure()
myConn.Close()
Response.Redirect(Request.RawUrl, True) End Sub

Go to the complete details ...