User bio
404 bio not found
Member since Nov 16, 2017
Posts:
Halim has not published any posts yet.
Replies:

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

Certifications & Credly badges:
Halim has no Certifications & Credly badges yet.
Global Masters badges:
Followers:
Halim has no followers yet.
Following:
Halim has not followed anybody yet.