Connection Con = new Connection();Statement Stmt = Con.createStatement();ResultSet R = Stmt.executeQuery('<STORED_PROCEDURE_NAME>');while (R.next()){ print R.getString(1);}
Harish Mohanbabu Long way to go before I sleep ..
Guys can any body Reply me for, how to insert a record in Sql Server from Ax4.0 with out using Axapta Table.
Thanks in advance!
sudvaep
Hi Sudvaep,
I guess you want to write to external SQL tables from Ax 4.0. I would write a stored procedure in SQL and call that from Ax. For example
----------------------------------------------------------------
....................................
sqlStat = strfmt("%1 %2", <Name of stored procedure>, curext());
stmt.execute(sqlStat);
In the above string, I am formatting the stored procedure name along with an input parameter. I like using stored procedure as I find it an elegant option. But there is no reason why a SQL statement can't be used instead.
Hope this helps,