MapInfo Pro Developers User Group

 View Only
  • 1.  MBX getting stuck on COMMIT statement

    Posted 07-10-2018 12:14

    One of our clients wrote this small piece of code as part of a larger architecture of code and noticed that for some reason, on their server, there is one line of code that gets stuck.

     

    They are running MIPro v12.5.1 on the machine.

    The code gets stuck during the COMMIT line at the end.

     

    I tested this code on my machine, on their dev machine, and on their production server. It is only causing problems on the server and only in one case. 

    If I run the code on my machine (MIPro v17) or on their dev machine (MIPro v12.5.1), the code executes in any way, no problems.

    On the server however, I can run it in the MapBasic window within MIPro, I can run it through the Tools menu after I add it. No problem. But when I try to double click on the MBX in the folder, it gets stuck while trying to perform the commit. This is a problem because the code is meant to be activated by other code and gets stuck.

     

    I have attached some screenshots with my explanation and the code used. 

     



  • 2.  RE: MBX getting stuck on COMMIT statement

    Posted 07-10-2018 09:20

    Hi Kobi,

    It probably has something to do with security permissions. That's my experience whenever there is a problem with the .DAT file.

    Just to clarify, when you double-click on the mbx to run it on the server, does it only get stuck if the tab files already exist?



  • 3.  RE: MBX getting stuck on COMMIT statement

    Posted 07-10-2018 10:29

    Hi @James Nolet?,

    Thanks for the response.

    Regarding the existing files, no. It acts the same even if I only have the .txt file and it needs to create completely new TAB files.

    Regarding the permissions, I will check with them again. But if I can run it through MIPro and it works, why would the permissions be different when I double click on the MBX? Is there a difference in the types of permissions that would need? Also, if it were a permissions issue, wouldn't the MBX crash as apposed to just getting stuck on the status bar that doesn't advance?

    Thanks again!



  • 4.  RE: MBX getting stuck on COMMIT statement

    Posted 07-10-2018 10:33

    @James Nolet?, in addition, regarding the folder permissions, the MBX is capable of creating the TAB file from the .txt. It only gets stuck after when it needs to re-save it as a new TAB. Which is what's weird to me. In your experience, is there a difference in the type of permissions needed to create a .TAB file as apposed to a .DAT file?



  • 5.  RE: MBX getting stuck on COMMIT statement

    Posted 07-10-2018 20:29

    Hi Kobi,

    It does seems like odd behaviour. Have you tried a different file name, or saving to a different folder? Not that it should make a difference...

    I'm no expert on these matters, but I think different permissions may come into effect if you use double-click. But as you say, it must be more than that because other files are created in the same folder. I'm wondering if the underline in the original file is confusing matters.



  • 6.  RE: MBX getting stuck on COMMIT statement

    Posted 07-11-2018 03:33

    Hi @James Nolet?,

    Thanks for the help and the input. I will have them verify re permissions.

    I also tried saving to different names, folders, saving a selection and not the table itself. No change in results.

    Will update here if and when a solution is found.