In general, you use temporary tables in much the same way as you use

regular tables. The crucial difference is that the data is deleted when there

is no longer a table buffer attached.

If you want to use a temporary table in a form, you will have to insert the

table in the form's data source.

Then you enter data into the table (buffer) using the form's init method. At

the end of the form's init method you must transfer the table buffer to the

form's data source, in order to avoid erasing data.

DatasourceName.SetTmpData(TableBufferName);

The same applies if you want to use a temporary table in a report.

However, in addition to the init method, you must also enter code in the

report's fetch method.


 
To sum this up, normally when you use a temporary table on the datasourse of a report for example you would first define a buffer of the temporary table type. If the buffer you defined is say MyTempBuffer you would then populate it. In order to get the datasource to see this data and use it you would simply execute the following line of command:
 
DatasourceName.SetTmpData(MyTempBuffer );
 

Temporary tables are instantiated and "live" where data are first inserted. The first insert determines

whether a table lives on the client or on the server. So it does not matter where, on the server or on the

client, a temporary table is declared. Even when you write code like server static

<tmptable>::createTable() that instantiates a table, the table still becomes a client temporary

table if the first record is inserted from client code.

If a temporary table has a new dataset (setTmpData), the temporary table will afterwards live where the

temporary table it's having it's data from are living.

Temporary tables are inserted and fetched remote as ordinary tables (caching, replication, "chunks").

Temporary tables are created as files in the local file system.

Hints

· A temporary table should live on the tier where it is used.

· If a temporary table is used on several tiers, the table should live on the tier where the largest

number of inserts and updates is performed.


Varden Morris <[EMAIL PROTECTED]> wrote:
As far as I can recall, when you call this method on a temporary table with a buffer as parameter it sets the pointer of the temporary table to point to the buffer in the parameter. The temporary table will then have access to the data in the buffer.
 

Varden Morris

Senior Developer

WellPoint Systems Inc.
Suite 2000, 500 - 4th Ave SW
Calgary
, Alberta, Canada
T2P 2V6

 

(403) 444-5848 direct

(403) 444-3900 main

www.wellpoint.ca



"Harry (Harshawardhan Deshpande" <[EMAIL PROTECTED]> wrote:
hi Patrick
 
I was joking the correct answer is 1)Set the table temporary as temporary
of course this does not serve any purpose since the table is already temporary.
 
regards
 
harry

chuapatrickd <[EMAIL PROTECTED]> wrote:
Hi Harry,

so you mean the answer is not among the choices because you can not
use setttempdata on a temporary table ?

What are settempdata anyway, pls clarify because I'm just new in
Axapta.

Regards,
patrick


--- In Axapta-Knowledge-Village@yahoogroups.com, "Harry
\(Harshawardhan Deshpande" <[EMAIL PROTECTED]> wrote:
> hi Patrick

> why would anyone use settmpdata on a temporary table?

> regards

> harry
>
> chuapatrickd <[EMAIL PROTECTED]> wrote:
> Hi to All,
>
> Any one who know the answer for this question ?
>
> When using temporary table what does settempdata(common) do?
> 1. Set the table temporary as temporary
> 2. Set table permanently as temporary
> 3. Points to the record in temp table where the cursor common
points to
> 4. Sets common as temporary
>
> Any answer with accompanying explanation is much appreciated.
>
> Thanks,
> Patrick
>
>
>
>
>
>
>
>
> Sharing the knowledge on Axapta.
>
>
>
> ---------------------------------
> YAHOO! GROUPS LINKS
>
>
>     Visit your group "Axapta-Knowledge-Village" on the web.
>  
>     To unsubscribe from this group, send an email to:
>  [EMAIL PROTECTED]
>  
>     Your use of Yahoo! Groups is subject to the Yahoo! Terms of
Service.
>
>
> ---------------------------------
>
>
>
>            
> ---------------------------------
>  Click here to donate to the Hurricane Katrina relief effort.



Click here to donate to the Hurricane Katrina relief effort.

__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com



Varden Morris
Senior Developer
WellPoint Systems Inc.
Suite 2000, 500 - 4th Ave SW
Calgary, Alberta, Canada
T2P 2V6

(403) 444-5848 direct
(403) 444-3900 main
www.wellpoint.ca
[EMAIL PROTECTED]


Click here to donate to the Hurricane Katrina relief effort.

Sharing the knowledge on Axapta.



YAHOO! GROUPS LINKS




Reply via email to