Question
· Dec 20, 2018

Using SQL inbound adaptor

Hi, 

I'm working on my first SQL service using the SQL inbound adaptor, and I'm having trouble. 

I've been following the documentation but it errors on  set req=##class(ESQL.request).%New()

Would anyone be kind enough to share a working example?

Kind regards, 

Stephen

Class ESQL.NewService1 Extends Ens.BusinessService 
{

Parameter ADAPTER = "EnsLib.SQL.InboundAdapter";

Method OnProcessInput(pInput As EnsLib.SQL.Snapshot,
   pOutput As %RegisteredObject) As %Status
{

 set req=##class(ESQL.request).%New()
 set req.CustomerID=pInput.Get("CustomerID")
 set req.SSN=pInput.Get("SSN")
 set req.Name=pInput.Get("Name")
 set req.City=pInput.Get("City")
 set sc=..SendRequestSync("ESQL.operation",req,.pOutput)

 quit sc
}

}
Discussion (1)0
Log in or sign up to continue