som.papai
27th January 2011, 13:05
Hi All,
I want to create a Logical temporary table in Baan. The table should not exist in database. Is it possible?
Basically the requirements need a temporary table to store data for printing.
I don’t want to create the table in database. If multiple users run the report same time then it will create issue like (dirty read, Phantom read, repeatable read).
Please advice.
Thanks,
Sudipta
sameer.don
28th January 2011, 08:10
Sudipta,
I don't think there is such functionality provided in baan. If you are using any table, it must exist in the database.
In such situation, where you need to store data temporarily, you can define and create one table. And include user (same as logname$) in the 1st Index of table.
Also, if required, you can have execution date and execution time fields as a part of 1st Index
This will allow your program to be executed by multiple users at the same time, without jumbling of data.
v_kewl
28th January 2011, 08:38
Hi,
You can use dynamic array (by using alloc.mem) to store the record in a buffer then print the stored record. Or you can use temporary table and use the functionality of UUID("uuid.generate$()"). Put this "uuid" in index1 of the table.
Regards,
Gaurav B
Kozure Ohashi
28th January 2011, 10:55
You could use an text file as a temporary data container.
mark_h
28th January 2011, 15:46
Hi All,
I don’t want to create the table in database. If multiple users run the report same time then it will create issue like (dirty read, Phantom read, repeatable read).
What I did was use user id added to the temp table, and if I wanted to allow them more than one session I could have added process ID so the records were always unique.
Hitesh Shah
31st January 2011, 17:43
While file / actual baan table may serve purpose in some situations , in some situations dyanmic arrays provides fastest way to create , manipulate , retrieve and destroy tables in program . U may refer in-memory performance dll (http://www.baanboard.com/baanboard/showthread.php?t=28569) for reference which hides complexities of qss functions by creating a simpler functional layer around those functions through dll .
Ajesh
21st September 2016, 10:45
I was just thinking on these lines. Can we create a Temporary Table which has all the facilities of retrieving,searching etc but not updating so that when the session ends there is no need to store the records.
I know people have mentioned Dynamic Arrays etc but this temporary table should reflect everything about a real table but only thing is it should not be stored in Dbase,
PS: This has come up because the customer wants a functionality of drill down which has a lot of data from lot of table so everytime we cannot create a table to store the data and display it.
bhushanchanda
21st September 2016, 12:50
Hi,
If you have access to source code, you can explore how idb.* functions work. Its mentioned over here (http://www.baanboard.com/baanboard/showthread.php?t=60484)
sameer.don
26th September 2016, 10:39
Ajesh,
You basically are looking for a functionality of a View.
I was just thinking on these lines. Can we create a Temporary Table which has all the facilities of retrieving,searching etc but not updating so that when the session ends there is no need to store the records.
I know people have mentioned Dynamic Arrays etc but this temporary table should reflect everything about a real table but only thing is it should not be stored in Dbase,
PS: This has come up because the customer wants a functionality of drill down which has a lot of data from lot of table so everytime we cannot create a table to store the data and display it.
Ajesh
26th September 2016, 12:04
Ajesh,
You basically are looking for a functionality of a View.
Yes, exactly that....I know it is not but still, is the functionality implemented on Baan??
sameer.don
26th September 2016, 12:36
Here is something you can give a try. I don’t know if this will work.
1. Create a normal table with all the fields you want.
Lets consider this example: you need 10 fields from 2 different tables, i.e., 5 fields from TDPUR401 and 5 from TDPUR405.
Hence create a table, say tdxxx001, with all the 10 fields, which should use the same domain as in the parent tables.
2. Once you do CRDD, table will get created in Database with name ttdxxx001400 (last three digits indicate company. 400 is a company code in this case)
3. Now, note down the exact table structure of ttdxxx001400 present in database.
4. Then drop the table ttdxxx001400 using DELETE..TABLE/DROP...TABLE sql query (suitable to your database) from database. This should be done at database. Do not delete anything from Baan
5. Create a view with name ttdxxx001400 by using CREATE VIEW query, which should refer to same fields from parent table, i.e. 5 fields from tdpur401 (name in database = ttdpur401400) and 5 fields from tdpur405 (name in database = ttdpur405400).
Since you have created a view, you will not need to update, insert anything to tdxxx001. The view ttdxxx001400 (tdxxx001) will always have relevant data from tdpur401 and tdpur405
As I said in very beginning, I am not sure if this will work. There is a certain way that Baan environment handles its communications with back-end database, which may cause this trick to fail.
Please let me know the result if you really implement this one.
Yes, exactly that....I know it is not but still, is the functionality implemented on Baan??
Ajesh
27th September 2016, 10:19
Here is something you can give a try. I don’t know if this will work.
1. Create a normal table with all the fields you want.
Lets consider this example: you need 10 fields from 2 different tables, i.e., 5 fields from TDPUR401 and 5 from TDPUR405.
Hence create a table, say tdxxx001, with all the 10 fields, which should use the same domain as in the parent tables.
2. Once you do CRDD, table will get created in Database with name ttdxxx001400 (last three digits indicate company. 400 is a company code in this case)
3. Now, note down the exact table structure of ttdxxx001400 present in database.
4. Then drop the table ttdxxx001400 using DELETE..TABLE/DROP...TABLE sql query (suitable to your database) from database. This should be done at database. Do not delete anything from Baan
5. Create a view with name ttdxxx001400 by using CREATE VIEW query, which should refer to same fields from parent table, i.e. 5 fields from tdpur401 (name in database = ttdpur401400) and 5 fields from tdpur405 (name in database = ttdpur405400).
Since you have created a view, you will not need to update, insert anything to tdxxx001. The view ttdxxx001400 (tdxxx001) will always have relevant data from tdpur401 and tdpur405
As I said in very beginning, I am not sure if this will work. There is a certain way that Baan environment handles its communications with back-end database, which may cause this trick to fail.
Please let me know the result if you really implement this one.
Dont think it will work. The STP would surely look into the Dbases before picking up the value and its not there in DB, error would surely come. Thanks for the effort though..