Function intels()

来源:百度知道 编辑:UC知道 时间:2024/05/03 06:20:54
Function intels()
With Inet1
try:
.url = "http://127.0.0.1/cc/gl_line.asp
.Execute , "post"
.Execute , "CLOSE" '关闭连接。
End With
End Function

.Execute , "CLOSE" '关闭连接。'
为什么我一用这句就出错:

实时错误“35764”,仍在执行上一请求.
如何解决此问题。

不关闭此连接好像很耗资源,怎么解决呢?
ljl88900你好,加上你的程序出错,好像无法下载完成全部数据就关闭了连接?

'按你的补充说明修改如下:
Function intels()
With Inet1
try:
.url = "http://127.0.0.1/cc/gl_line.asp
.Execute , "post"
do while .StillExecuting =true '增加部分,等待请求完成
doevents
loop
'.Execute , "CLOSE" '关闭连接。 '把这一句去掉
End With
End Function

注意符号...

你一POST就想关掉它啊?当然会这样提示了。
你在Inet1_StateChanged事件中去检查它的状态,等POST完了再CLOSE试下。