Monday, 25 November 2013

Automatic backup of xpo's

Automatic backup of xpo's


X++ Code to Export AOT Object / automatic backup of xpo's.

we need to take daily backup of our development (interms of xpo) , but we all always forget becuase of our hectic work schedules.
So use the following job and build batch application to take backup of developement in terms of xpo .
We can take aod also but the size will be more and needs to stop AOS everytime .

Following job illustrates how to export/backup all AOT Classes object.

void DEV_ExportTreeNodeExample()
{

TreeNode treeNode;
FileIoPermission perm;


#define.ExportFile(@"c:\AOTclasses.xpo")
#define.ExportMode("w")
;


perm = new FileIoPermission(#ExportFile, #ExportMode);
if (perm == null)
{
return;
}


perm.assert();


treeNode = TreeNode::findNode(@"\Classes");
if (treeNode != null)
{


// BP deviation documented.
treeNode.treeNodeExport(#ExportFile);
}


CodeAccessPermission::revertAssert();
}


Enjoy !!!!!!!!

No comments:

Post a Comment

SQL/SSRS Interview questions I thought of blogging some SQL/SSRS interview questions.

Below are some. I will add more, when I complete the compilation 1. What is OLTP(Online Transaction Processing)? OLTP stands ...