Yes, I had the same issue.
Some sql ODBC adapters accept the double quotes, some not, it's safer to remove them.
All the best.
Hi Ewan,
Yes, it's possible to call a SP from an sql server, we use it a lot and it works fine.
Yes, it returns an Integer but usually that's not the result returned by the SP
the result is in %sqlcontext, I use it like this :
ClassMethod GetApptsSP(URNO As %String = "3123456") As %Status
{
// calling the SP
set status = ##class(Hospital.SP.tpGetAppts).tpGetAppts(URNO)
s rs=%sqlcontext.NextResult() // getting the result
While rs.%Next() {
s dateTime = rs.%Get("DueTimestamp")
s ApptDate = $P(rs.%Get("DueTimestamp")," ",1)
....
}
q $$$OK
}
hope this help
![Open Sesame!](https://community.intersystems.com/sites/default/files/badges/303371180-6de11138-f4e7-4113-b5cc-836269f07693.png)
![Challenge Starter](https://community.intersystems.com/sites/default/files/badges/295959213-b83dd91a-663f-4f07-8e0e-e3287b7c2309.png)
![DC Commenter](https://community.intersystems.com/sites/default/files/badges/dc_commenter_1.png)
![DC Problem Solver](https://community.intersystems.com/sites/default/files/badges/dc_problem_solver_1.png)
Hi There
I think it would be much easier to achieve what you are looking for by adding a custom process ( that includes your rules/logics using the code) between the service and the operation and then the operation sends the response to the process.
If you need more help, please let me know
Thanks