FYI, in your "Building SQL In Strings" section, you can also still use %SQL.Statement like this:
set stmt = ##class(%SQL.Statement).%New()
// Note the question mark in the query.set query = "SELECT Name, Age FROM Patient WHERE ID=?"set sc = stmt.%Prepare(query)
// You can add error handing here if the above status results in an error// Providing variables to the %Execute method will insert them where the question marks are in the query, in orderset rs = stmt.%Execute(id)- Log in to post comments