Using SQL inbound adaptor

Primary tabs


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, 


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