我正在为 vb 中的工资系统使用 OLE db 连接。在第一次保存交易时,它会成功保存在数据库中,但是当我回来选择另一个帐户来计算其工资并尝试保存时,它会返回一个错误,指出“插入时存在语法错误”。
这是我的代码:
com5 = "INSERT INTO PayrollReport Values('" & empno.Text & "','" & ename.Text & "','" & startdate.Text & "','" & _
cutdate.Text & "'," & bpay.Text & "," & computation.Text & "," & grosse.Text & "," & _
lwop.Text & "," & tardiness.Text & "," & tax.Text & "," & sssp.Text & "," & _
philp.Text & "," & hdmfp.Text & "," & sssl.Text & "," & hdmfl.Text & "," & _
advance.Text & "," & taxdue.Text & "," & nete.Text & "," & deduction.Text & "," & _
netpay.Text & "," & Employee.Esss.Text & "," & Employee.Ephil.Text & "," & Employee.Ehdmf.Text & ")"
MsgBox(" The " & ename.Text & "'s Record has been save!")
connect5()
希望你能帮我解决这个问题...