Home > Ax 2012, Ax Technical > Dynamics ax 2012 – Copying Temp Table instance for SQL TempDB

Dynamics ax 2012 – Copying Temp Table instance for SQL TempDB

SQL Temp db introduced in Dynamics Ax 2012 is powerful then the “In memory” tables that was in use so far. It works across tiers and is relatively easier to understand and use.

This  post is about creating a new instance link(Populating data/Copying Reference) from one table instance variable to the other with SQL temp db type tables. With the standard “In memory” tables to copy the reference we use the “setTmpData” but for SQL temp db use the method mentioned below

static void UsingInMemory(Args _args)
{
   //Inmemory
   TmpABC abc, newAbc;

   abc.Amount = 50;
   abc.insert();

   newAbc.setTmpData(abc);
}

static void UsingSQLTempDB(Args _args)
{
   //SQL TempDB
   TmpABC abc, newAbc;

   abc.Amount = 50;
   abc.insert();

   newAbc.linkPhysicalTableInstance(abc);
}
Advertisements
  1. No comments yet.
  1. No trackbacks yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: