Error using TextIo command on W7 pc (Ax 4.0)

Hello,

this is my first post here in this forum. Could please someone help me?

I have a trouble using the TextIo command. I have to generate a text file from this class

When Ax excutes the red instruction, the variable ‘FileIo’ should become ‘new’.

If you excute this class from a Windows XP computer, the ‘FileIo’ becomes ‘new’ and Ax generates the text file on pc.

If you excute this class from a Windows 7 computer, the ‘FileIo’ becomes ‘null’ and Ax doesn’t generate the text file on pc.

Have you ever expericed that problem? Thank you

I posted an image, but I see now that it does not appeare in the post I wrote.

This is the class: CustVendOutPaym. These are the instractions (method newFile):

protected static client Io newFile(Filename _filename,
str _mode = ‘w’,
str _type = ‘AsciiIo’)
{
Io fileIo;

switch (_type)
{
case ‘AsciiIo’ :
→ fileIo = new TextIo(_filename, _mode, 850);
break;

case ‘CommaIo’ :
fileIo = new CommaTextIo(_filename, _mode, 850);
break;

default :
throw error ("@SYS62665");
}

return fileIo;
}

This only means that AX was unable to open the fileů the reason is usually either a wrong path or user permissions (including UAC).

Thank you Martin.

Yesterday I found out the solution of this problem. The mistake was that Ax tried to name the file like this yyyymmdd_hh:mm:ss and we know that : is not allowed in a file name. We changed the regional setting of the pc, setting format time from hh:mm:ss to hh.mm.ss. After that Ax generate a file name in the correct format (yyyymmdd_hhmmss).