目的就是按多条件查询 然后将结果显示在多个textbox中
然后做到这一步 在试第一个型号的时候 点确定之后 没有任何反应
没有报错 = = 没有结果······
数据库
代码————————Imports System.Data.Sql
Public Class Form1
Dim mycon As New System.Data.SqlClient.SqlConnection
Dim mycmd As New System.Data.SqlClient.SqlCommand
Dim myada As System.Data.SqlClient.SqlDataAdapter
Dim myda As New DataSet
Dim myrea As System.Data.SqlClient.SqlDataReader
Private Sub Label1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles brand.Click
End Sub
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
mycon.ConnectionString = "Data Source=WIN-FL6893HHQA8;Initial Catalog=shoes;Integrated Security=True"
mycon.Open()
End Sub
Private Sub Label4_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Label4.Click
End Sub
Private Sub bthcancel_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles bthcancel.Click
MessageBox.Show("感谢您的使用!", "球鞋选择系统")
Me.Close()
End Sub
Private Sub bthconfirm_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles bthconfirm.Click
Dim str1 As String = " "
If chksite.CheckedItems.Count <> 0 Then
Dim x As Integer
For x = 0 To chksite.CheckedItems.Count - 1
str1 = str1 & "Checked Item " & (x + 1).ToString & " = " & chksite.CheckedItems(x).ToString & ControlChars.CrLf
Next
End If
mycmd.CommandText = "select * from 鞋子 where sbrand=' " & cbbrand.Text & " ' and smaterial like' %" & cbmaterial.Text & " %' and sprice='" & cbprice.Text & "'and sconcept='" & cbconcept.Text & "'and ssite like'% " & str1 & "'"
mycmd.Connection = mycon
myrea = mycmd.ExecuteReader()
While (myrea.Read())
tbtype.Text = myrea.GetString(1)
End While
End Sub
End Class
求指导!!!!!!!跪求= =