当我双击此错误时,请帮助我。
代码:
Private Sub removefromlist()
Try
If lstvwDetail.Items.Count > 0 Then
SQL = "select COUNT(*) from Item_Master im join Item_Master_Type imt on im.Item_Type_ID=imt.Entry_id " & _
" where imt.Main_Category_Type='FINISHED' and Item_Code=" & Tact_Dll.GetItemCode(lstvwDetail.FocusedItem.SubItems.Item(0).Text) & ""
CMD = New SqlCommand(SQL, Tact_Dll.Cons)
If IIf(IsDBNull(CMD.ExecuteScalar), 0, CMD.ExecuteScalar) > 0 And ChkAlltem.Checked <> True Then
ChkAlltem.Checked = True
End If
End Sub
答案 0 :(得分:0)
如果这有帮助,请在sql statent中的项目代码后添加单引号。因此,
Item_Code='value'