ashishjain
5th May 2011, 20:14
Hi,

Does anyone know how to create a temporary table (virtual table) in BaaN?This table should not have any physical existence.
Table should get created at run time & after performing the operation it should get deleted.

Sometimes we need to store data in some temporary table to perform some operation & when operation gets completed the we delete the data from table. Currently we are creating a table in BaaN to achieve above functionality but if we have any option in BaaN to create virtual table so there is no need to physically create a table in BaaN for such kind of operations.

Suggestion & Comments are most welcome.

Thanks...

EdHubbard
5th May 2011, 20:45
Have a look at this thread:

http://www.baanboard.com/baanboard/showthread.php?t=59931&highlight=alloc.mem

ashishjain
6th May 2011, 03:24
Thanks for the link. But this link is about dynamic array that i am aware of. We can not use indices with arrays. We can use dynamic arrays but i just want to confirm is there any way of creating logical table (but not dynamic array).

Thanks...

EdHubbard
6th May 2011, 09:31
You can use the qss functions though with arrays

http://www.baanboard.com/programmers_manual_baanerp_help_functions_searching_sorting_data_example

It's not something I've used myself..... but I can see that one of our dlls (written by a decent programmer unlike myself!) has made good use of it. As it works, I've never had the need to understand it in too much depth.

Hope that helps

Ed

BaanInOhio
7th May 2011, 03:04
I normally use dynamic arrays with the "qss" functions for sorting and searching. Another option is use of the "idb" functions. They are similar to the "db" functions but store data in memory. The table definition that you use for the "idb" calls must be defined in maintain tables. You can utilize these by including "tccomdll0201" in your script. If you have source code, you can try to search for "idb." for examples. I learned how to use them from standard Baan code for dealing with estimated and actual materials in production order maintenance.

I find it easier to write a custom DLL with functions for setting up the memory table (allocate memory), writing to the table, searching the table, closing the table (free memory). If done properly, you can make the calls look just like "db." calls used with tables.

Hitesh Shah
11th May 2011, 18:28
Thanks for the link. But this link is about dynamic array that i am aware of. We can not use indices with arrays. We can use dynamic arrays but i just want to confirm is there any way of creating logical table (but not dynamic array).

Thanks...

Dynamic arrays are nothing but tables created and destroyed on the fly in program script .
If u use the same with in view of the concept illustrated in performance dll (http://www.baanboard.com/baanboard/showthread.php?t=28569) , grpstr / indxstr (group/index string) is nothing but index
comprising of any baan data converted to fixed len string and concatenated in fixed order. The trailing
numeric part in grpstr is an index or pointer to other fields of the table in the memory and thus contain links
to other unsorted fields of the table.

If u view the arrays created , manipulated , indexed and destroyed this way,it's nothing but temp tables with an index but without permanent disk storage.