Hello ..
I made a program that has insert , update and delete ... am using VS.NET 2003 and sql 2000 ... the following code that i use it for insert ...
and it give an error .. can anybody help me with that plz..
Regards
I made a program that has insert , update and delete ... am using VS.NET 2003 and sql 2000 ... the following code that i use it for insert ...
VB.NET:
If (txtEqCode.Text <> "" AndAlso txtVichNo.Text <> "") Then
With danew.InsertCommand
.CommandText = "INSERT INTO main (Code, Plateno, Serialno,Model,ki,Description,Specification,Note) VALUES (@Code, @Plateno, @Model,@ki,@Description,@Specification,@Note)"
.Parameters.Add("@Code", txtEqCode.Text)
.Parameters.Add("@Plateno", txtVichNo.Text)
.Parameters.Add("@Serialno", txtCods.Text)
.Parameters.Add("@Model", txtModel.Text)
.Parameters.Add("@ki", txt_eq_type.Text)
.Parameters.Add("@Description", txt_eq_des.Text)
.Parameters.Add("@Specification", txtSpec.Text)
.Parameters.Add("@Note", txtRemark.Text)
End With
danew.InsertCommand.ExecuteNonQuery()
and it give an error .. can anybody help me with that plz..
Regards