CFtpConnection::PutFile only creating 0 length file on server

hey guys, i recently made a tiny app using the MFC class CFtpConnection that 
is sending files to an AS/400 server. its been working consistently for a few 
months now with no problems. but in the last couple of weeks its been 
failing. during the method PutFile(), it would set the transfer type to ASCII 
and it would try to put the file on the server, but it only creates a 0 
length file with the appropriate filename and timesout (usually after like 3 
minutes or so) with a bad return code. 
ive googled it in groups and have found similar cases where this function 
was doing the same thing but no one has gotten a specific reason why and how 
to resolve the issue. the one answer i found was to seek to the end of the 
file before i write it... but im not sure i understand what they meant by 
that. has anyone else encountered this problem and maybe have found a 
solution?
I tried using GetLastError, this is returning a code of 183. still trying to 
use formatmessage to figure it out.
-1
nattylife (2)
8/8/2006 12:46:08 PM
vc.mfc 33608 articles. 0 followers. Follow

1 Replies
835 Views

Similar Articles

[PageSpeed] 29

Hi Nattylife
Using errlook I found that errorcode matching 'Cannot create a file when 
that file already exists. ' message. I think you could try deleting target 
file before transferring again. Maybe then you can obtain another error, that 
could be the real one.

"nattylife" wrote:

> hey guys, i recently made a tiny app using the MFC class CFtpConnection that 
> is sending files to an AS/400 server. its been working consistently for a few 
> months now with no problems. but in the last couple of weeks its been 
> failing. during the method PutFile(), it would set the transfer type to ASCII 
> and it would try to put the file on the server, but it only creates a 0 
> length file with the appropriate filename and timesout (usually after like 3 
> minutes or so) with a bad return code. 
> ive googled it in groups and have found similar cases where this function 
> was doing the same thing but no one has gotten a specific reason why and how 
> to resolve the issue. the one answer i found was to seek to the end of the 
> file before i write it... but im not sure i understand what they meant by 
> that. has anyone else encountered this problem and maybe have found a 
> solution?
> I tried using GetLastError, this is returning a code of 183. still trying to 
> use formatmessage to figure it out.
-1
8/9/2006 6:04:02 PM
Reply:

Similar Artilces:

Windows Mail and Live.com acct/servers
I have vista..and I have Windows Mail. I tried to set up an account for it to receive my @live.com email and I keep getting an error - it also asks for POP3 and so on and I don't know what that is for @live.com accounts. Shouldn't I be able to get my live.com emails in Windows Mail? Use the settings given here: http://mailcall.spaces.live.com/Blog/cns!CC9301187A51FE33!49799.entry Use port 587 rather than port 25 for the SMTP server. If you continue to get an error message, right-click on your error=20 message, copy, then paste it into a reply here. --=20 Gary VanderM...

Issue for CRM 3.0 and Outllook 2007
Hi, I was able to access CRM 3.0 from Outlook 2007. It installs on Vista. I haved decided to modify selection for contact synchronisation in "local Data". I had the list and when I have selected the good choice, I had this message in French: "une erreur s'est produite..." - translation in English: "error, contact your adminsitrator". After this message, I was not able to access any data from CRM in Outlook. It's OK to acces with IE. I installed Roll up 2, uninstall and reinstall again, I have always the same message. Is it possible to have more d...

How to create a Help File?
Hi there, Im developping an Visio VBA application, and I'd like to include a Hel section in it. There is an item in my menu called "Help", and I want t open the Help Contents by clicking on that menu. I'd like to know wha format has to be the file? Can it be a Visio file? what is the best an easiest way to do that? Thanks a lot in advance! Avalon2 -- avalon2 ----------------------------------------------------------------------- avalon27's Profile: http://www.officehelp.in/member.php?userid=18 View this thread: http://www.officehelp.in/showthread.php?t=76025 Visit - htt...

.csv drops "0" when saved, even if file was set as "text".
Hi. I need to save files as .csv for importing Product Codes into my purchasing system. My problem is that, even if I change the relevant column to "TEXT", after saving the file as a .csv the "0" or even sometimes "00" that appear at the beginning of many of the product code is being dropped by Excell when the file is reopened. Any thoughts on how I can solve this issue? "TRminator" <TRminator@discussions.microsoft.com> wrote in message news:567B41B9-4DED-4150-854C-DD84DF9D2AEE@microsoft.com... > Hi. I need to save files as .csv for imp...

Exchange server stops sending and receiving mail 30 min after SMTP starts
I have a strange problem. If I restart exchange server it works for 30-50 min, then there is no more communication and I can not send and recaive mails. This happends after SMTP service is started. If I do not start SMTP than everythink is OK. I use NAV Corporate 9. ...

Warnings with Inf2Cat.exe for new INF files
Hello we are seeing some new warnings with the INF2cat tool, with our newly formatted INF files. We started getting the warnings when we changed the format of our INFs to have only one bus enumerator per line. For example: [LEXMARK_PRINTERS] "Lexmark Universal XL" = LMUD0C40.GPD,LPTENUM\Lexmark_Internationa6EF4 "Lexmark Universal XL" = LMUD0C40.GPD,USBPRINT\Lexmark_Internationa6EF4 "Lexmark Universal XL" = LMUD0C40.GPD,WSDPRINT\Lexmark_Internationa6EF4 "Lexmark Universal XL" = LMUD0C40.GPD,Lexmark_Internationa6EF4 ...

Catching messages of dynamically created CStatic members
Hi fellows. I have a CWnd-derived class that has two CStatic members, that are created dynamically. My question is simple: What must I do in order to receive messages of such members? This CWnd-derived class is for creating a custom control. This control needs vertical scrollbar, so I'm using two bitmaps, one as de up arrow and the other as the down arrow. I already placed them, now I need to receive the notification (the click notification). // in the header CStatic m_lblArrowUp; CStatic m_lblArrowDown; // in the Create method m_lblArrowUp.Create(_T(""), WS_CHILD | WS_VIS...

changing details for a contact-person that another user created
Hi All, we have several departments using the CRM, and people would like to have the possibility for changing the details in a contact person that was created by another user. Normally a chief would make a contact and add it in CRM, and then the stuff takes over, and maintains those contact - but they don't have the right to edit those contact... How do I solve this? Thanx in advance, Regards, Zoran I assume you have one Business Unit. If you look at security role , there are options "Write " "Append" "AppendTo" under the tab"Core Records"...

Outlook XP Outgoing server can't be connected
We use optonline for our ISP and our email with McAfee as our virus protection. When my wife uses her laptop at home and connects via wireless router, she is able to send and receive emails through Outlook XP. However, when she goes to her office and uses the DSL connection there, she can receive mail but not send it. I had found a possible fix recommending Service Pack 3 for office but that doesn't work. This just started happening. I've replaced the profile but to no avail. There is no firewall at my wife's work. It's just a real estate office with DSL. Has ...

Why don't ChemDraw Ole's appear in a PDF file made from Word?
I have a Word file that contains OLE's created with ChemDraw. When I convert the Word file to a PDF, all of the OLE's disappear. This does not occur in an equivalent WordPerfect file. With WordPerfect, all of the OLE's appear when I create the PDF file. Hi gmbodner, In Word, click on the Print dialog's Options button and makes sure the "Print drawings created in Word" option is checked. -- Cheers macropod [Microsoft MVP - Word] "gmbodner" <gmbodner@discussions.microsoft.com> wrote in message news:F5511497-915C-4F5D-A863-45F949...

excel2003: while opening .xls file, it complian "spreadsheet req.
while opening the old .xls file the office2003 complian " spreadsheet require Microsoft excel version 7 or later" If some one had experince this issue, Please let me know. The above .xls file use the macro After it comes up with that message, is there an OK button or are there other buttons? If there is an OK button, does the file open after clicking OK? Did you create the file or did someone else create it, or was it obtained from a third-party? "jitender singh" wrote: > while opening the old .xls file the office2003 complian " spreadsheet require > M...

Schedule Service Activities In CRM 3.0
I have created a Service call "Install Network Cable" I have allocated 3 people to as resources for this service. When I attempt to schedule a service activity that spans multiple work days and click on find available times, I get an error message stating: "No results found. Try using different dates or letting the system choose your resources automatically." Start date is configured for Specific Date Start time is configured for Specific Time Duration is selected for 3 Days Can anyone help me please? Just a guess, maybe because the service activity spans more days, ...

Mail User Profile and Data Files
My Outlook 2007 no longer start and I believe it is the outlook pst file that has been coorupted. I have deleted the profile from the Mail control panel icon and started with new profile. Outlook start well asking me my various info to set up the email service. Everything is fine to taht point but the minute I try to setup the data files (pst formoat either) I get the fol msg. This information service is not install on your computer. The next box dialogue box from Outlook at startup is: Either there is no default mail client or the current mail client cannot fulfill the...

Search that creates a dynamic query
I'm trying to create a dynamic query that is created when the search button is clicked. I got it to work to a certain point before, but now I'm stuck. Its supposed to search from multiple criteria, and pull up any records that match. Here is the code: Dim db As Database Dim QD As QueryDef Dim ctl As Control Dim sSQL As String Dim sWhereClause As String Set db = CurrentDb() ' Delete the existing dynamic query; trap the error if the query does ' not exist. On Error Resume Next db.QueryDefs.Delete ("Dynamic_Q...

Business Portal 4.0 & GP 10.0 Smartlist
Hi, Is there a way to use our GP 10 smartlists in the query sections of Business Portal 4.0 ? I've look at the Business Portal query builder and I don't think you can use SQL (in this case I could have extract Smartlists SQL). You have to used predefined entities. Maybe I get it wrong ? Thanks in advance for any help ! Richard, Thanks for using the newsgroups. You are correct. You need an entity for querying in Business Portal. Thanks Rob -- Rob Bernhardt Software Quality Assurance Microsoft Business Solutions This posting is provided "AS IS" with no warranties...

Problem with CFTPConnection
Hi I've an application that connects to an FTP Server and uploads a big directory (size over 500 MB). Now what happens is that after sometime the application stops uploading files and stays idle. The FTP server connection timeout value is set to 2 minutes. So the server seeing the connection idle for two seconds, disconnect the session and no more file is uploaded. On debugging I found out that after some time CFTPConnection.PutFile() method hangs on some random file and stays like that for 5 minutes (default send timeout value of CFTPSession). During this time the server connection timeo...

Open excel files disappear from toolbar
Hi, Excel 2000 / Win XP Pro. When I have more than one excel file open, the active file stays in the toolbar and the others end up in "window" which is a pain when trying to move between open files. WORD keeps all the files in the toolbar. Can anyone help? It's a pain! Is "Tools->Options->View" - "Windows in task bar" what you're after? -- Regards; Rob ------------------------------------------------------------------------ "Glen_S" <anonymous@discussions.microsoft.com> wrote in message news:235C1881-2C7B-4B29-BF5D-B48874680...

Performance Monitoring for CRM 4.0 with SCOM or another tool? #2
Hi. As far as I can tell, the only performance monitoring pack for CRM 4.0 is for MOM; however we run Microsoft SCOM. I was wondering the following: 1. Could someone be nice enough to post the CRM MOM counters and thresholds so we can build our own perfmon script? 2. Could someone let me know if a monitoring pack for SCOM will someday be available? (either from MS or 3rd party) 3. Could someone let me know if there is an existing 3rd party utility I could use to monitor my CRM environment (I haven't seen one but maybe there is one). Thank you! ...

How to create pie chart with %
I have got a problem that I don't if excel could help me to calculate the % within a column and draw a pie chart. My case is I have a column containing a series of numbers. e.g. 1,4,8,1,3,9,11,2,4,5,6,.........etc I want to draw a pie chart that showing 1-3 , 4-6, 7-9, >9 with the corresponding % inside that column. Can anyone tell me how can I make it ? Ray - You need to calculate the frequencies in your data. Let's assume your data is in A1:A12. In B1:B3 enter these numbers, the upper limits on the groupings: 3 6 9 You can enter ">9" into B4 witho...

Email address not created when a new user is created
All, This issue recently happened in my company. Upon creating a new user, the policy was set to create the smtp and X400 address automaticaly. Now when we create a user the smtp and x400 addresses are not created, and when attempting to setup the new user in outlook, the address cant be found. We are using exchange 2003 SP1 on Win2k3 servers. On Wed, 13 Jul 2005 06:49:07 -0700, "Bryan" <Bryan@discussions.microsoft.com> wrote: >All, >This issue recently happened in my company. Upon creating a new user, the >policy was set to create the smtp and X400 addres...

when form created
I have a form which was created by someone else (not a form template) which is like a questionnaire with empty boxes to be completed. When the boxes are typed in all the margins move to accommodate the words being typed. Is there a way to fix/lock the original form and then just fill in the blank boxes? I suspect this is set up as a table with auto resizing enabled. Displaying table gridlines (Table | Show Gridlines) will help you see what you're dealing with. Then select the table, go to the Table tab of Table Properties, click Options, and clear the check box for "A...

Exchange 2010 MRM, no log files being created
I'm hoping someone can help me with this issue....it has been driving me crazy for days. I have enabled MRM logging on our exchange server, and I can see that some of the policies are working when I run start-managedfolderassistant. We have a retention policy tag on the deleteditems folder, and this does work. The problem is I am not getting any files in the MRM log directory. C:\Program Files\Microsoft\Exchange Server\V14\Logging\Managed Folder Assistant Events 9021 and 9022 are logged in the Application log, but where are the files? Below is the output of my mai...

Creating a Brochure
How do you create a 3-column brochure from scratch for Publisher 2002? I can only find the directions for the 2003 version. Quick help would be appreciated, project is due Monday. Create a three-panel or four-panel folded publication http://office.microsoft.com/en-us/assistance/HP011646681033.aspx Scroll down to the section that says "Build a three-panel or four-panel publications from scratch." -- Mary Sauer MSFT MVP http://office.microsoft.com/ http://msauer.mvps.org/ news://msnews.microsoft.com "Derek" <Derek@discussions.microsoft.com> wrote in message news...

CRM 3.0 Small Business Edition
We are looking to deploy the above CRM version from Microsoft Action Pack - but are encountering some difficulties. Does this application have to be installed onto an SBS server directly? Can it not be installed on a server which participates in a SBS domain? Regards -- Mark Baker Operations Manager SITOC Ltd Must be installed on SBS server. Ian "Mark Baker" <MarkBaker@discussions.microsoft.com> wrote in message news:E202DEC8-C1A5-4A3E-86F3-094D462ECBE8@microsoft.com... > We are looking to deploy the above CRM version from Microsoft Action > Pack - > but are ...

Users mailboxes not created when user created
I have a problem that recently just started happening on my exchange 2003 server. When i create a new user account and create the mailbox for exchange, once im done, the mailbox isnt created, adn if you go into the properties of the user account adn go to the exchange email address tab, there isnt an smtp or an x.400 address listed. I am having to manually create and add these, adn then go delete the exchange mailbox and recreate it. This is really annoying and would love to know if anyone has any ideas of how to fix it. Thanks Jason In news:9F836A43-98BF-435A-AA43-AFF10124BE3F@micro...