添加数据参数出错,为什么!
myComponent.SqlInsertCommand1.Connection = myComponent.SqlConnection1
myComponent.SqlConnection1.Open()
myComponent.SqlInsertCommand1.CommandText = "Insert Into igb (UserName,EMail,Subject,Contect) values (@UserName,@EMail,@Subject,@Contect)"
myComponent.SqlInsertCommand1.Parameters.Add(New SqlClient.SqlParameter("@UserName", SqlDbType.NVarChar, 20)).Value = username.Text
myComponent.SqlInsertCommand1.Parameters.Add(New SqlClient.SqlParameter("@EMail", SqlDbType.NVarChar, 50)).Value = email.Text
myComponent.SqlInsertCommand1.Parameters.Add(New SqlClient.SqlParameter("@Subject", SqlDbType.NVarChar, 255)).Value = subject.Text
myComponent.SqlInsertCommand1.Parameters.Add(New SqlClient.SqlParameter("@Contect", SqlDbType.NText)).Value = contect.Text
myComponent.SqlInsertCommand1.ExecuteNonQuery()