Sub read_allmessage() '读取关于该客户的所有对话 If data_link() = False Then
'出错
Exit Sub End If adpt = New SqlDataAdapter("[read_allmessage]", connhaiwang)
adpt.SelectCommand.CommandType = CommandType.StoredProcedure adpt.SelectCommand.Parameters.Add("@customer_id", SqlDbType.Int)
adpt.SelectCommand.Parameters("@customer_id").Value = Request.QueryString("customer_id") Dim table As DataTable
table = New DataTable
Try adpt.Fill(table) Catch ex As Exception connhaiwang.Close() Exit Sub End Try Dim i As Integer txt1.Text = "" For i = 0 To table.Rows.Count - 1 txt1.Text = txt1.Text & table.Rows(i)("customer_content") & vbCrLf Next
connhaiwang.Close() End Sub
我想每隔10秒执行一次上述操作
'出错
Exit Sub End If adpt = New SqlDataAdapter("[read_allmessage]", connhaiwang)
adpt.SelectCommand.CommandType = CommandType.StoredProcedure adpt.SelectCommand.Parameters.Add("@customer_id", SqlDbType.Int)
adpt.SelectCommand.Parameters("@customer_id").Value = Request.QueryString("customer_id") Dim table As DataTable
table = New DataTable
Try adpt.Fill(table) Catch ex As Exception connhaiwang.Close() Exit Sub End Try Dim i As Integer txt1.Text = "" For i = 0 To table.Rows.Count - 1 txt1.Text = txt1.Text & table.Rows(i)("customer_content") & vbCrLf Next
connhaiwang.Close() End Sub
我想每隔10秒执行一次上述操作
解决方案 »
- asp.net 模糊查询
- 請教正則表達式!~
- 如何通过点击按钮自动打开一个超级链接
- SQL 语句放到asp.net2.0中的问题
- 我将密码MD5加密,为什么总是编译出错啊???
- sql记录合并,急!先谢各位!
- 各位大虾:treeview控件怎么套在表格里啊?急急急啊?
- 请问为什么不能得到url传的中文字符啊?我用url?param=中文字符,但是用Request.QueryString["param"]不能得到该中文,为什么啊,只能传英
- DataGrid中DataRowView一个貌似简单的问题,请大家解决一下,不胜感激!。
- ASP.NET自带的上传组件是不是有大小限制的?
- 关于DataGrid控件显示的问题
- 简单问题100分
1000是
秒,url是地址
你究竟要做什么哦
是要返回结果到用户界面还是只是刷表?
只刷表的话,很简单,做一个自动启动的服务
进入死循环 然后让Thread 睡觉(sleep)10秒然后再刷就是了!
要控制也可以,做一个可调用的异步web service,线程间通信到msdn上看哈
http://blog.csdn.net/net_lover/archive/2003/08/27/6943.aspx