Problem with temporary tables

vasilis80
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 ! ](*,)
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 ! ](*,)
0
Comments
-
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.0 -
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.0
-
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.0 -
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.0 -
So what would making the parameter temporary do - if anything?
-a0 -
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.0 -
awarn wrote:So what would making the parameter temporary do - if anything?
-a
Nothing.
At least, it does not make sense to do it. :?0
Categories
- All Categories
- 73 General
- 73 Announcements
- 66.6K Microsoft Dynamics NAV
- 18.7K NAV Three Tier
- 38.4K NAV/Navision Classic Client
- 3.6K Navision Attain
- 2.4K Navision Financials
- 116 Navision DOS
- 851 Navision e-Commerce
- 1K NAV Tips & Tricks
- 772 NAV Dutch speaking only
- 617 NAV Courses, Exams & Certification
- 2K Microsoft Dynamics-Other
- 1.5K Dynamics AX
- 320 Dynamics CRM
- 111 Dynamics GP
- 10 Dynamics SL
- 1.5K Other
- 990 SQL General
- 383 SQL Performance
- 34 SQL Tips & Tricks
- 35 Design Patterns (General & Best Practices)
- 1 Architectural Patterns
- 10 Design Patterns
- 5 Implementation Patterns
- 53 3rd Party Products, Services & Events
- 1.6K General
- 1.1K General Chat
- 1.6K Website
- 83 Testing
- 1.2K Download section
- 23 How Tos section
- 252 Feedback
- 12 NAV TechDays 2013 Sessions
- 13 NAV TechDays 2012 Sessions