Results 1 to 5 of 5

Thread: Using (Foxpro) functions filetostr and strtofile in a Webapp

  1. #1
    Senior Member
    Join Date
    Feb 2012
    Location
    Germany, near Jena and Weimar
    Posts
    121

    Using (Foxpro) functions filetostr and strtofile in a Webapp

    Using (Foxpro) functions filetostr and strtofile to read and write a specific file (f.e. e:\xxx\yyy\z.txt) on my server is ok in DeskApp but not in WebApp.
    Error message: File not exists. Error number: 15

    Is it not possible to use these functions in a Webapp?

    Thanks Georg

  2. #2
    Lianja MVP
    Join Date
    Feb 2012
    Location
    Berea, KY, USA
    Posts
    1,948
    Hi Georg,

    filetostr() will run where the code runs, which is on the server, not on the client. Could that be the issue? If so, more details follow.

    You can upload a file using networkrequest (http://www.lianja.com/community/show...load-in-Lianja) Here's a thread for further reference: http://www.lianja.com/community/arch...hp/t-3027.html

    Note that you can upload a file from the user's desktop into a data file using the Attachments section, and then can run filetostr() on the memofield using mtos() .

    hth,

    Hank

  3. #3
    Senior Member
    Join Date
    Feb 2012
    Location
    Germany, near Jena and Weimar
    Posts
    121
    >> filetostr() will run where the code runs, which is on the server, not on the client. Could that be the issue? <<

    Thank you, Hank!

    The file I want to read / write is (later on) on the server. This time, I check it with the server delivered with the Lianja App Builder. Maybe I should transfer the App to my server?

    Bye Georg

  4. #4
    Lianja MVP
    Join Date
    Feb 2012
    Location
    Berea, KY, USA
    Posts
    1,948
    Hi Georg,

    assuming you have deployed the app to the server on the APaaS, and are calling the filetostr() through a call on the server (using Lianja.evaluate() from the JavaScript, or using an .rsp page) there should be no issue.

    Hank

  5. #5
    Senior Member
    Join Date
    Feb 2012
    Location
    Germany, near Jena and Weimar
    Posts
    121
    Thank you Hank, strengthened my intention. Now it's ok.

    Maybe the reason was I accessed a shared drive on Linux system (working with Windows in a VirtualBox)

    Georg

Bookmarks

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Journey into the Cloud
Join us