| 网站首页 | 业界新闻 | 小组 | 威客 | 人才 | 下载频道 | 博客 | 代码贴 | 在线编程 | 编程论坛
欢迎加入我们,一同切磋技术
用户名:   
 
密 码:  
共有 302 人关注过本帖
标题:求助!!,经常出现错误,请高手帮忙
只看楼主 加入收藏
曾经沧海SX
Rank: 1
等 级:新手上路
帖 子:1
专家分:0
注 册:2010-4-2
收藏
 问题点数:0 回复次数:0 
求助!!,经常出现错误,请高手帮忙
有一个小程序,是用FTP方式到IP地址为129.56.140.40的电脑上的aaa目录下(密码为010e)接收三个文件,文件不是每天都有的运行时有时可用,但很多时候都出错,错误是:
运行时错误: '-2147417848(80010108)':Automation错误

代码如下,请那位高手帮忙看一下,是错在那儿
Private Sub Command1_Click()
Dim Dat1, Dat2, mdate, Firstdat, Firstend
    Dat1 = Text1.Text
    Dat2 = Text2.Text
   
Firstdat = DateAdd("d", -1, Dat1)    '日期格式
aaa = DateAdd("d", -1, Dat2)
Firstend = DateAdd("d", 1, aaa)
            
While Not (Firstdat = Firstend)
        
mdate = DateAdd("d", 1, Firstdat)
Firstdat = mdate
indate = Format(Firstdat, "yyyymmdd")

Inet1.Execute "FTP://aaa:010e@129.56.140.40", _
"GET " & indate & "_123-01.zip C:\aaa\" & indate & "_123-01.zip", "QUIT"
right1 = Inet1.StillExecuting
Do While right1
right1 = Inet1.StillExecuting
DoEvents
Loop

Inet1.Execute "FTP://aaa:010e@129.56.140.40", _
"GET " & indate & "_123-02.zip C:\aaa\" & indate & "_123-02.zip", "QUIT"
right2 = Inet1.StillExecuting
Do While right2
right2 = Inet1.StillExecuting
DoEvents
Loop

Inet1.Execute "FTP://aaa:010e@129.56.140.40", _
"GET 001_" & indate & "_001_456.zip C:\aaa\报表数据\001\001_" & indate & "_001_456.zip", "QUIT"
right3 = Inet1.StillExecuting
Do While right3
right3 = Inet1.StillExecuting
DoEvents
Loop

Wend
MsgBox "接收完毕"
Unload Me
End Sub

Private Sub Command2_Click()
Unload Me
End Sub
搜索更多相关主题的帖子: IP地址 密码 
2010-04-02 11:08
快速回复:求助!!,经常出现错误,请高手帮忙
数据加载中...
 
   



关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.023423 second(s), 7 queries.
Copyright©2004-2024, BCCN.NET, All Rights Reserved