本文介绍了Visual Basic 6插入sql的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

您好



我有这个代码:



Hi

I have this code:

If Len(txtSalary.Text) = 0 Or Len(txtmCover.Text) = 0 Or Len(txtMember.Text) = 0 Or Len(txtmRate.Text) = 0 Then

       MsgBox "Enter Values"

    Else
        tsql = "INSERT INTO Hpacc4(SalaryBill,Rate,Membership,Cover) " & _
               "VALUES('" & txtSalary.Text & "','" & txtmCover & "', '" & txtMember.Text & "', '" & txtmRate.Text & "')" & _
               "WHERE Scheme = '99993' AND RunMonth = '200604' AND AccCode = '110'"

       cnHPtest.Execute (tsql)


    End If





当我运行它时,我的WHERE caluse会出错,请帮忙。我无法看到我在哪里出错。



When I run it I get an error at my WHERE caluse, please help. I can't see where I went wrong there.

推荐答案



这篇关于Visual Basic 6插入sql的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

06-18 12:23