Results 1 to 9 of 9

Thread: Table not found after deployment

  1. #1
    Member
    Join Date
    Sep 2015
    Posts
    80

    Table not found after deployment

    hi,

    I have this temporary table temp_artrans. I just wonder why the system cannot found this table when it is physically exist in the production database of the system. But this only happens after deploying the project which is app center is being used. In the app builder, the program works very fine.

    Please see attached file for the error message.

    Thanks a lot.
    Attached Images Attached Images  

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

    What runtime environment are you in? Desktop? Service? Mobile?

    What code creates the temporary table?

    Hank

  3. #3
    Member
    Join Date
    Sep 2015
    Posts
    80
    Runtime environment is Desktop.

    No code for creating the temporary table because it's not actually temporary. It is already created together with the other tables. I just empty that table before inserting records.

    thanks.

  4. #4
    Member
    Join Date
    Sep 2015
    Posts
    80
    Here's the code where the error points.

    select temp_artrans
    use
    use temp_artrans exclusive
    delete from temp_artrans
    pack

  5. #5
    Lianja MVP
    Join Date
    Dec 2012
    Location
    Croatia, Zagreb
    Posts
    1,099
    Hi,

    You lose nothing by rebuilding database to see if it solves your problem.
    http://www.lianja.com/doc/index.php/REBUILD_DATABASE

    Also, I would always:
    Code:
    use temp_artrans exclusive in 0
    And which occurrence of temp_artrans is in the line 82 from the error message?
    Select, use or delete command?
    Last edited by josipradnik; 2016-04-06 at 05:04.

  6. #6
    Member
    Join Date
    Sep 2015
    Posts
    80
    hi,

    it's in the select command.

    we followed your recommended code which is "use temp_artrans exclusive in 0" and it worked in one pc but in the other client pc it didn't worked. maybe because the table was used exclusively in one pc so the other pc cannot access the other table.

    what would be the appropriate code to remove the exclusive use of table the "temp_artrans".

    thanks a lot.

  7. #7
    Lianja Support Team lianjasupport's Avatar
    Join Date
    Feb 2012
    Location
    Boston USA, Wokingham UK
    Posts
    1,268
    Remove the 'EXCLUSIVE' keyword from the USE command.

    You cannot run PACK on a shared table. If you want individual users to have their own temporary table, then use TMPNAM() or SYS(2015) along with COPY STRUCTURE or COPY STUCTURE EXTENDED + CREATE FROM.

  8. #8
    Member
    Join Date
    Sep 2015
    Posts
    80
    hi,

    Removing 'EXCLUSIVE' keyword from the use command doesn't changed anything. Please check the code if it's the proper way of doing it.

    select temp_artrans
    use
    use temp_artrans exclusive
    delete from temp_artrans
    pack
    use temp_artrans

    Using this code, it seems that table temp_artrans is still in exclusive use because only one client PC can access it. To the other PC on the network error message 'temp_artrans.dbf not found'.

    thanks

  9. #9
    Lianja MVP
    Join Date
    Dec 2012
    Location
    Croatia, Zagreb
    Posts
    1,099
    Hi,

    I will explain how I read your code.
    Code:
    select temp_artrans // cursor is open before, I just set my focus on it
    use // I close it
    use temp_artrans exclusive // I open it again, but EXCLUSIVELY , so no one can touch it besides me
    delete from temp_artrans // I deleted all records
    pack // I want physical purge the cursor
    use temp_artrans // I try to open already opened cursor, without closing it after (exclusively) packing. Not sure what is the effect, maybe it is ignored.
    
    Maybe you need to reconsider whole thing, Why you are not trying with real temporary table?
    If you want individual users to have their own temporary table, then use TMPNAM() or SYS(2015) along with COPY STRUCTURE or COPY STUCTURE EXTENDED + CREATE FROM.
    In that case the user who need to, can exclusive use it and pack it. Colliding with no one in multiuser environment.

    If it is not a real temporary table (maybe you need it for data bound in a section), then you can add a field to its structure which will contain user's ID and every user will be responsible to delete his own records. And see his own records only by filtering.
    This is what I meant with reconsidering whole approach. It is better to explain your whole idea. Maybe you are "overdoing" it and bump to unnecessary problems.

    Josip
    Last edited by josipradnik; 2016-04-12 at 07:50.

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