Dear all!
I am using AX 2012 and have some function of stored procedures to output file to linkage to other system.
Basically , output file include collected data of AX transactions and stored procedure is executed from ~month to~month .
I have AX screen menu to execute stored procedure.
From screen, give parameter1(start month) and parameter2(end parameter) and call 2 stored procedures.
but , when I execute , the process of the program didn't finished, but when stored procedure program is executed from SQL server management studio, the process is finished.
I used executeUpdate()method to execute stored procedure from screen.
Is there any other method to execute stored procedure or any other batch not from screen, but from any other way, like separately executed from screen.
Here is my source:
else if(subStr(param,13,8) == 'AXXXXXX1')
#
{
# sql = builder.ToString();
# sql = strDel(sql,strLen(sql),1);
#
# Conn = new Connection();
# Stmt = Conn.createStatement();
# sqlPermission = new SqlStatementExecutePermission(sql);
# sqlPermission.assert();
#
# try
# {
#
# Stmt.executeUpdate(sql);
# }
# catch (exception::Error)
# {
# throw error('@SYS99562');
# }
#
# CodeAccessPermission::revertAssert();
#
# sql = builder.ToString();
# sql = 'Exec AXXXXXX2' + subStr(sql,14,18);
#
# Conn = new Connection();
# Stmt = Conn.createStatement();
# sqlPermission = new SqlStatementExecutePermission(sql);
# sqlPermission.assert();
#
# try
# {
#
# Stmt.executeUpdate(sql);
# }
# catch (exception::Error)
# {
# throw error('@SYS99562');
# }
#
# CodeAccessPermission::revertAssert();
#
# }
*This post is locked for comments
Stay up to date on forum activity by subscribing. You can also customize your in-app and email Notification settings across all subscriptions.
André Arnaud de Cal... 291,240 Super User 2024 Season 2
Martin Dráb 230,149 Most Valuable Professional
nmaenpaa 101,156