可以转载,转载请著名作者和出处,谢谢,特别鄙视转载后扣上自己名字的哥们
关于syslog自己的php页面查询大量记录出现假死情况的问题,自己用.net编写了一个syslog的简单查询前端,使用MySql.Data.dll类
'连接字符串连接后,使用dataset
Dim ds1 As New DataSet("ds1")
Dim myDA1 As MySqlDataAdapter
Dim myConn1 As MySqlConnection
Dim constr As String
Dim strSql As String
constr = "port = " & TextBox2.Text & ";Data Source=" & TextBox1.Text & ";User Id=" & TextBox3.Text & ";Password=" & TextBox4.Text & ";CharSet=utf8"
myConn1 = New MySqlConnection(constr)
myConn1.Open()
strSql = "show databases;"
myDA1 = New MySqlDataAdapter(strSql, myConn1)
myDA1.Fill(ds1)
'查询的时候使用limit,每页显示20条记录
strSql = " select date,time,host,message from " & a & " where date between '" & b & "' and '" & c & "'limit " & ((_curPage - 1) * 20) + 1 & ",20;"
阅读(988) | 评论(0) | 转发(0) |