房门照片:求助:asp.net代码的问题,谢谢

来源:百度文库 编辑:神马品牌网 时间:2024/05/01 07:17:49
Private Sub Button5_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button5.Click
Dim str As String = _
"Provider=Microsoft.Jet.OLEDB.4.0;" & _
"Data Source=C:\Inetpub\wwwroot\erp\erp\database\cpxs.mdb;" & _
"User ID=Admin;" & _
"Password="
conn = New OleDb.OleDbConnection(str)
conn.Open()
Dim d As String = "select * from cpxs where 产品名称='" + DropDownList2.SelectedValue + "'"
Dim bb As OleDbCommand = New OleDbCommand
Dim red As OleDbDataReader
bb.CommandText = d
bb.Connection = conn
red = bb.ExecuteReader
DataGrid1.DataSource = red
DataGrid1.DataBind()
End Sub 查询不出来不知道哪里错了?还有如何根据文本框中的日期进行查询,给我各语句好吗?文本框中的是文本类型和日期类型不一致,如何写呢,十分感谢