当前位置:编程学习 > C#/ASP.NET >>

求助组合查询问题!!!!!!!!!!!

 做组合查询,这段代码有什么问题么?怎么总是查不出来..........


Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
        Dim SqlStr As String
        SqlStr = "Select * from mst where  (异动原因 = '" & ComboBox1.Text = "" & "'or 异动原因 is NULL) and (异动结果='" & ComboBox2.Text & "'or 异动结果 is NULL) and (系='" & TextBox1.Text & "'or 系 is NULL)"
        OleDbCommand1.CommandText = SqlStr
        DataSet11.Clear()
        OleDbDataAdapter1.Fill(DataSet11)
    End Sub --------------------编程问答-------------------- 又一个不会调试代码的..
你把SqlStr 设断点看一下,然后贴到sql里面去运行 --------------------编程问答-------------------- 看着好乱
补充:.NET技术 ,  VB.NET
CopyRight © 2022 站长资源库 编程知识问答 zzzyk.com All Rights Reserved
部分文章来自网络,