错误:数据类型不匹配条件表达式

时间:2014-01-14 17:34:51

标签: vb.net-2010

这是我在VB.net 2012的问题,当我运行时,显示此错误:数据类型不匹配标准表达式

Public Sub AddPOS()
    vatAmount = Format((lblTotalCost.Text * 0.12), "#,##0.00")
    nonVatAmount = Format(lblTotalCost.Text - vatAmount, "#,##0.00")
    Try
        sqL = "INSERT INTO POS(InvoiceNo, POSDate, POSTime, NonVatAmount, VatAmount, TotalAmount, StaffID, CustomerNo) VALUES('" & lblInvoiceNo.Text & "', '" & Format(Date.Now, "Short Date") & "', '" & Format(Date.Now, "Long Time") & "', '" & nonVatAmount & "', '" & vatAmount & "', '" & lblTotalCost.Text & "', '" & frmMain.lblEmployeeNo.Text & "'," & Val(lblCustomerNo.Text) & ")"
        ConnDB()
        cmd = New OleDbCommand(sqL, conn)

        cmd.ExecuteNonQuery()
    Catch ex As Exception
        MsgBox(ex.Message)
    Finally
        cmd.Dispose()
        conn.Close()
    End Try
End Sub

0 个答案:

没有答案