Protected Sub Btn1_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles Btn1.Click
Dim sConnStr As String = {MyConnectionString} Dim cnBKTest As New SqlConnection(sConnStr) Dim cmdTest As New SqlCommand("Insert_Test", cnBKTest)
cmdTest.CommandType = Data.CommandType.StoredProcedure
cmdTest.Parameters.Add(New SqlParameter("@TestParam", Data.SqlDbType.VarChar, 10)) cmdTest.Parameters("@TestParam").Value = "Testing"
cnBKTest.Open() cmdTest.ExecuteNonQuery() cnBKTest.Close()
End Sub
No comments:
Post a Comment