sub DataBind()
if Application("title")="" then
ta1.Visible="true"
ta1.text="请输入查询条件"
else
thetit = Application("title").ToString().Trim
Dim qurStr As String
Dim intlen As Integer = thetit.Length()
Dim i As Integer
Dim Ss As String
For i = 0 To intlen
If i < intlen Then
i = i + 1
End If
Ss=Ss & thetit[i].ToString() & "%"
Next
sql = "select * from tablename where title like '%" + Ss + "'"
Dim cnn As OleDbConnection
Dim cmd As OleDbDataAdapter
Dim dt As New DataSet
strcnn = "provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & Server.MapPath("./database/query.mdb")
cnn = New OleDbConnection(strcnn)
cnn.Open()
cmd = New OleDbDataAdapter(sql, cnn)
cmd.Fill(dt)
repeater1.DataSource = dt
repeater1.DataBind()
cnn.Close()
End If
end sub