Posts

Many connections to SQL from AOS dax 2012

Image
The other day I was confronted with problem of lost AOS coonections to SQL. It happens then I try to post several large ledger journals in parralel tasks. I founded some problems with number of connections. Then posting is running number of connections to hight. I founded it with SQL script Version Dax 2012 R2 SELECT ec.client_net_address, es.[program_name], es.[host_name], es.login_name, COUNT (ec.session_id) AS [ connection count ] FROM sys.dm_exec_sessions AS es WITH (NOLOCK) INNER JOIN sys.dm_exec_connections AS ec WITH (NOLOCK) ON es.session_id = ec.session_id GROUP BY ec.client_net_address, es.[program_name], es.[host_name], es.login_name ORDER BY ec.client_net_address, es.[program_name] OPTION (RECOMPILE); It happens because UserConnection class must call finalize method. Like this This code example from DimensionStorage.savePrivate() class. Also Statement and ResultSet  class must be closed. Code example. This code exampl...

How to post transfer order from code X++

It took me to post transfer order from X++, and i dont find astandart method to do it. There is some code to do it. This is for Dax 2012 R3 version static void postTransferOrder(Args _args) { InventTransferUpd inventTransferUpd; InventTransferMultiShip inventTransferMultiShip; InventTransferParmTable transferParmTable; InventTransferParmLine transferParmLine ; InventTransferJour inventTransferJourShiped; InventTransferLine transferLine ; InventDim inventDim; LineNum lineNum; //+ Create InventTransferParmTable // InventTransferMultiReceive // InventTransferMultiPick inventTransferMultiShip = InventTransferMultiShip::construct(); // use diffrent classes for ship, receive and pick RunBaseMultiParm::initParm(inventTransferMultiShip); inventTransferMultiShip . insert(inventTransferTable, transferParmTable); transferParmTable . EditLines...