vendredi 26 novembre 2010

How to write values from DataBases tables in a text File in Dynamics AX

Here is the code :)

void f_txt(str path)
{
    String30                    m,m1,m2,m3,total;
    asciiio                     f;
    ;
    f = new asciiio(path,'w');

        m1 = "2563148";
        m2 = "000000254";
        m3 = "789645";
        f.outFieldDelimiter("");
        f.write(m1,"00",m2,"0000",3);
}

the path must be set as following : 

path = "C:\\ D0311001.A600.txt";

You get in your file text this value : 

 25631480000000025400003

Happy Daxing!

Aucun commentaire:

Enregistrer un commentaire