i have a windows forms with 7 texboxes, i would like to save the input into a sqwl databse , but i am having a bit of problem, this is my code:
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim con As New SqlConnection("server = GX520B\SQLEXPRESS;Initial Catalog=return;Integrated Security=True")
Dim cmd As New SqlCommand("insert into dbo.RMA (Rma_Number,Vendor,Device,Serial_Number,Model,Problem,Date) values (@Rma_Number,@Vendor,@Device,@Serial_Number,@Model,@Problem,@Date)")
cmd.Connection = con
con.Open()
cmd.Parameters.AddWithValue("@Rma_number", Me.TxtRMA.Text)
cmd.Parameters.AddWithValue("@Vendor", Me.TxtVendor.Text)
cmd.Parameters.AddWithValue("@Device", Me.TxtDevice.Text)
cmd.Parameters.AddWithValue("@Serial_Number", Me.TxtSN.Text)
cmd.Parameters.AddWithValue("@Model", Me.TxtModel.Text)
cmd.Parameters.AddWithValue("@Problem", Me.TxtProblem.Text)
cmd.Parameters.AddWithValue("@Date", Me.TxtDate.Text)
Dim reader As SqlDataReader = Nothing
cmd.ExecuteNonQuery()
con.Close()
end sub
i am getting the error:
Invalid column name serial_number