Import/Upload File in RTC

artur+1artur+1 Member Posts: 18
edited 2012-10-02 in NAV Three Tier
Hi all

I have one issue. I want to upload excel file for importing data. For open window for choosing a file I use

UploadedFileName := CommonDialogMgt.OpenFile(Text001,'',2,'',0);

like in standard report 81 and works fine in CC, but when I want to upload file in RTC importing takes much more time ,it's very slow and before uploading when I clik in assist button appears msg: The server has requested to run Microsoft Common Dialog Control. version 6.0 ...(this probably is not the proper control for RTC) ,but uploading is successful. The problem is that last too long.

How can I avoid this. It's the same Principe from standard reports but doesn't work fine.

Any suggestion?

Thanks in advance.

Reg

Comments

  • ddlarscddlarsc Member, Microsoft Employee Posts: 19
    The OpenFile is using an OCX automation control which you should consider using the built-in UPLOAD C/AL command instead to get better performance

    Uploaded := UPLOAD(WindowTitle,'',Filter,ClientFileName,ServerFileName);

    or try using the DotNet type instead of the OCX
    DotNet System.Windows.Forms.OpenFileDialog.'System.Windows.Forms
    “This posting is provided "AS IS" with no warranties, and confers no rights.”

    Lars-Bo Christensen
    Software Developer @ Microsoft
  • artur+1artur+1 Member Posts: 18
    I have tried with Upload but it works slow again.
    Would You like to tell me more about other option, please. How to use it in navision?

    Thanks
  • ddlarscddlarsc Member, Microsoft Employee Posts: 19
    The UPLOAD should be the fastest method.

    So I wonder how big is the file you want to upload to the server?
    “This posting is provided "AS IS" with no warranties, and confers no rights.”

    Lars-Bo Christensen
    Software Developer @ Microsoft
Sign In or Register to comment.