Hi
I wrote a simple program to download a CSV file from as400. The program is written using C#.net and I have used Client access ActiveX control for this. Please see below
here the DatabaseTransferClass define in the activex control. But when I ran this program I got the following error CWB4016 - Internal data transfer routine returned error code 32312 I tried to google this but so far no luck. Can any one have any idea on this ??
Many Thanks
Anuradha
I wrote a simple program to download a CSV file from as400. The program is written using C#.net and I have used Client access ActiveX control for this. Please see below
Code:
public bool AS400FileDownload(string SystemIp,string UserName,string Password,string FileNameWithLibrary,string PCFilePath) { DatabaseTransferClass transfer = new DatabaseTransferClass(); try { transfer.Password = Password; transfer.UserID = UserName; transfer.Download(SystemIp, FileNameWithLibrary, PCFilePath, cwbdtFileTypeEnum.cwbdtCSV); Logger.Log("Downloading Success"); return true; } catch (Exception e) { if (File.Exists(PCFilePath)) { File.Delete(PCFilePath); } Logger.Log("Exception has occured\n"); Logger.Log("Module : FTPClient->AS400FileDownload()\n"); Logger.Log("Error :" + e.Message + "\n"); Logger.Log("Stack Trace :" + e.StackTrace + "\n"); Logger.Log("AS400 Error code : "+ transfer.Errors.ReturnCode.ToString()); return false; } }
Many Thanks
Anuradha
Comment