none
No Table is open in the curent area. RRS feed

  • Question

  • I have unique issue, When my internet is on and when I run the frx report and in preview when I ask for next page it give me the error "No table is open in the current area". But when my internet is off it work fine. I am using Windows 10 home edition and Visual FoxPro 9 sp2.

    Any body do have any suggestions

    Thxs

    Rajesh Mistry

    Thursday, October 4, 2018 3:48 AM

Answers

  • Hi,

    I am glad you have got your solution, we appreciated you shared us your solution and mark it as an answer.

    Best regards,

    Alex


    MSDN Community Support Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    • Marked as answer by Rajesh Mistry Friday, October 12, 2018 11:58 AM
    Monday, October 8, 2018 9:26 AM
    Moderator

All replies

  • By "internet is on," do you mean that the computer is connected to the Internet? or that you have a Browser open? or something else?

    Tamar

    Thursday, October 4, 2018 8:43 PM
    Moderator
  • Thanks for your response Tamar.

    Computer is connected to internet through wifi.

    I got the issue. Let me explain.

    On my main form which is always active. In that form I have a timer, in which it will check for the internet connection after every defined interval. I have a routine which will check the log for unsend SMS.

    There are few unwanted user process where this process need to informed to the owner of the company. My idea was, by any chance internet goes off, whether by user intentionally or by any other means, and within that time any unwanted process has been done by the user and system was unable to send the SMS to owner, I move the SMS detail to a logfile.

    As already mentioned earlier that in my main form in timer it will check for such unsend SMS log. System go through the logfile and send those SMS to owner. But again it will check for internet connection and it will do the need full.

    if I comment the following lines my most of the issues has been resolved

    Let me know if there is any other way to do it.

    My following code is as follows,

    IF intcheck() then

     SELECT 0
     USE msglog
     IF RECCOUNT() > 0 then
      SCAN
       DO sendsms WITH msglog.smsmobile,TTOC(msglog.datetime) + '%0a' + msglog.msg,.f. 
      ENDSCAN
      DELETE ALL
     ENDIF
     USE
    endif

    *-----------------
    PROCEDURE intcheck
    *-----------------
    DECLARE INTEGER InternetGetConnectedState IN WinInet ;
    INTEGER @lpdwFlags, INTEGER dwReserved
     
    LOCAL lnFlags, lnReserved, lnSuccess
    lnFlags=0
    lnReserved=0
    lnSuccess=InternetGetConnectedState(@lnFlags,lnReserved)
    RETURN (lnSuccess=1)


    Friday, October 5, 2018 3:58 AM
  • I think I got the exact issue.

    If you go through my code  you will see that I am opening a table and doing some process and the I close the table 

    what exactly was happening was once I close the log file, there is no table open in the current area and because of which any routine which is executed and in between it execute the timer, my current areas gets lost, so when it resume to the routine, and it looks for the table used in current area and system was unable to get the area and the error msg is Shown, "No table is open in current area". So it was not the internet ON/OFF issue but something else.

    Let me get back after making changes to my timer code and check of it works properly or not.


    Friday, October 5, 2018 4:11 AM
  • Re-solved, yes it works :)

    It works now 

    I have made the necessary changes

    IF intcheck() then

     mycurralias = ALIAS()          -----------------> Line added
     SELECT 0
     USE msglog
     IF RECCOUNT() > 0 then
      SCAN
       DO sendsms WITH msglog.smsmobile,TTOC(msglog.datetime) + '%0a' + msglog.msg,.f. 
      ENDSCAN
      DELETE ALL
     ENDIF
     USE
     SELECT &mycurralias           --------------------> Line added
    ELSE

    endif

    Friday, October 5, 2018 4:22 AM
  • Hi,

    I am glad you have got your solution, we appreciated you shared us your solution and mark it as an answer.

    Best regards,

    Alex


    MSDN Community Support Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    • Marked as answer by Rajesh Mistry Friday, October 12, 2018 11:58 AM
    Monday, October 8, 2018 9:26 AM
    Moderator