Querying a SQL view I built in SSMS from an Aras server method:
string SQL_View = "innovator.my_custom_sql_view";
string SQL = "select * from " + SQL_View;
Item SQL_qry = inn.applySQL(SQL);
This is quick for me because I do a lot in SQL, but I know it is bad practice. So, I want to replace this SQL injection using IOM:
I created a new SQL item, type=View, with the contents from the custom SSMS view.
What is the correct C# code to get the view results?
Item SQL_qry = inn.newItem("SQL", "get");
SQL_qry = SQL_qry.apply();
This code just gets the SQL item, not the contents of the View.
I couldn't find anything in the Programmers guide for this, and the Blog posts were only about Stored Procedures, not Views.
I'm thinking it should work the same way, but I haven't figured out the correct IOM syntax.