Problem with temporary tables

vasilis80vasilis80 Member Posts: 2
Hi !
I am using temporary tables to create a functionality based on Item Ledger entry Table. In some place I use DELETEALL on the temporary table.The problem is that a couple of times item ledger entry was totally deleted. I suspect that the problem comes from temporary table. (I assume that because I have another functionality that uses temp Tables and also there I lose my records from time to time.) Please if anyone knows anything that may occur by the use of Temporary table please inform me [-o< ... Thank you very much ! ](*,)

Comments

  • Marije_BrummelMarije_Brummel Member, Moderators Design Patterns Posts: 4,262
    edited 2005-12-02
    You need to analyse this via the Development Toolkit

    Find out where delete of Item Ledger entries occur.

    There is probably one occasion where it is not temporary.

    I've neve experienced problems useing temporary tables.

    If you don;t trust it, you can make a copy of the 32 table and use this instead of the 32 table.
  • DenSterDenSter Member Posts: 8,307
    Doing any write operation (modify/delete/deleteall,etc) on a temporary record variable NEVER affects records in the actual physical table, that's the whole point of using them. If you lost data because of it, it is because it was done on a variable that was not a temporary variable. Double check that the variable that you are doing a DELETEALL on is a temporary variable.
  • starfinderstarfinder Member Posts: 2
    Hi!

    Make sure, that you don't pass temporary record to a function with non-temporary parameter. In that case, if you call DELETEALL for this parameter within function, you will delete actual data from table.
  • Marije_BrummelMarije_Brummel Member, Moderators Design Patterns Posts: 4,262
    starfinder wrote:
    Hi!

    Make sure, that you don't pass temporary record to a function with non-temporary parameter. In that case, if you call DELETEALL for this parameter within function, you will delete actual data from table.

    This only works if you use the VAR option. Then the temp-property is inherited. If you use VAR you don;t have to make the parameter TEMP.
  • awarnawarn Member Posts: 261
    So what would making the parameter temporary do - if anything?

    -a
  • DenSterDenSter Member Posts: 8,307
    It's a little bit like a user defined datatype. You use a temporary record variable to create a structure in your computer's memory that acts exactly the same way as the table does that the variable is based on. One example that I can think of is an XMLPort. I set mine up to import into a temporary table, so that at the end of the XMLPort I can program exactly what I want to do with the records. Also, because it is a temporary record variable, I don't have to worry about the records already being there, I know everything is new to the variable.

    Also very handy is the option to use tables outside the license range as a temporary record variable. It's just one way to store values in memory.
  • Marije_BrummelMarije_Brummel Member, Moderators Design Patterns Posts: 4,262
    awarn wrote:
    So what would making the parameter temporary do - if anything?

    -a

    Nothing.

    At least, it does not make sense to do it. :?
Sign In or Register to comment.