Guidance
指路人
g.yi.org
Guidance Forums / Reginald Rexx / InetFile "reload" issue

Register 
注册
Search 搜索
首页 
Home Home
Software
Upload

  
Forum List • Thread List • Reply • Refresh • New Topic • Search • Previous • Next First 1 Last
Message1. InetFile "reload" issue
#13202
Posted by: DougA 2009-12-28 07:19:19
Been using the "Inet" functions, and normally a good download returns a null value.

  err = InetFile(HostFN, LocalFN, 'RELOAD')

err will be '' for good download.

Then created some new code and started getting the following in err
"The operation completed successfully."

This now causes my error test to fail, but it said it was "successful", so I modified the If err= clause to include a test for this new "error" message.

Ok, now I don't fail on the err test, but then discover, IT DIDN'T DOWNLOAD THE FILE !!

Go to the web site, and find that the file I want to download doesn't exist.
So, instead of saying something like "file not found", or "download error" or anything besides "SUCCESSFULLY" would be fine.

That is a VERY MISLEADING return value.
Doug
Message2.
#13203
Posted by: Jeff Glatt 2009-12-29 05:55:44
The error message reported is simply whatever the Windows operating system transport protocol receives back from the server. I have no control over the error message (nor error numbers). It's probably just a server failing to report back an error. There is some really badly written code out there that fails to handle, and report, errors. Proper error checking is almost never taught in Computer Science classes, and there are lots of lazy programmers who tend to just dispense with error-checking. They don't seem to care what happens when their code doesn't work.
Message3. inetfile "reload" issue
#13204
Posted by: cliff boley 2009-12-30 00:18:36
Jeff,
hear hear! 
We have a poorly written app that was failing for two weeks before the users
came around and ask why they weren't getting any reports.
Message4. You gotta wonder
#13205
Posted by: Michael S 2009-12-30 15:58:30
how important the report was if it took them 2 weeks to notice/complain.

I've just finished a report that looks every day for data in a table and produces a report and sends it via e-mail. I deliberately wrote it so that it even sends a report saying "nothing found" when such is the case. That way the users at least KNOW that the program was run (albeit with nothing found)
Forum List • Thread List • Reply • Refresh • New Topic • Search • Previous • Next First 1 Last
掌柜推荐
 
 
 
 
 
 
 
 
 
 
 
 
© Fri 2024-4-26  Guidance Laboratory Inc.
Email:webmaster1g.yi.org Hits:0