我正在使用此代码,但它不起作用,它显示“在SQL语句后找到的字符”消息。我该如何解决?
objCommand.CommandText = "INSERT INTO TBL_Onvan(Onvan, Notes)VALUES(@Onvan,@Notes); AND INSERT INTO TBL_OnvanRevayat(ID_Onvan, ID_Revayat)VALUES(@ID_Onvan, @ID_Revayat)"
objCommand.Parameters.AddWithValue("@Onvan", txtOnvanFaray.Text)
objCommand.Parameters.AddWithValue("@Notes", txtNotes.Text)
objCommand.Parameters.AddWithValue("@ID_Onvan", intId)
objCommand.Parameters.AddWithValue("@ID_Revayat",CType(BindingContext(table).Current("ID"), String))