I’m trying to import data from a .csv file and write the data in the table.
Problem is that it crashes everytime the action tries to run.
while(io.status() == IO_Status::Ok)
while select forupdate importTable
importTable.LineNr = conpeek(con, 1);
importTable.ItemName = conpeek(con, 2);
importTable.Price = conpeek(con, 3);
importTable.Stock = conpeek(con, 4);
This problably isn’t a good way to do it.
Ok the second while loop is redundat. But still the problem remains.
Please give us more about your problem. What’s the line of code where it crashes? Do you get any error? How do you create io object? What’s your version of AX?
It’s dynamics ax 2009. A class where the run method starts reading the file and tries to import the data.
Creating the file, fileio permission asserted.
io = new CommaIO(filename, #io_write);
Im suspecting it crashes during the loops. Maybe the transactions take up too much memory. But i’m not sure.
Instead of mere suspecting, please debug the code to find it out. I couldn’t debug your code in your system even if I wanted.
The code was fine just problems with the system not with ax.