Using Dynamics Ax 2012 tables from Visual Studio


I am using Ax tables on my .NET code in order to read or write some records but I have seem that after creating some thousands of instances I get an error.

After using my records I call on them the dispose method and I even make them null.

Should I have something else to avoid this problems?

I do all my stuff in the same session and transaction. For the moment I have solved my problem dividing my work in smallest pieces and logon and logoff my session between them but I consider this not very elegant and I would like to discover what I am doing wrong.


Sorry! :slight_smile:

I have reviewed my code and in fact I forgot the dispose and null for the table objects in one place. Then. It is very important to free your table objects in your .NET code!!