MaxRowsToGet on EnsLib.SQL.InboundAdapter
I have a query that returns around 6000 records that I need to go through and update another MS SQL Table. I would like to execute this once a day. How do you set MaxRowsToGet on a EnsLib.SQL.InboundAdapter service?
Thanks
Scott
Product version: IRIS 2024.1
$ZV: IRIS for UNIX (Red Hat Enterprise Linux 8 for x86-64) 2024.1 (Build 267_2U) Tue Apr 30 2024 16:06:39 EDT [HealthConnect:7.2.0-1.r1]
Discussion (3)0
Comments
you have to create new class Extends EnsLib.SQL.InboundAdapter
Overwrite OnInit()
Set ..%Row.MaxRowsToGet=-1 [get all records]
My Init is as follows..
Method OnInit() As%Status
{
Set..InitDSN = ..Adapter.DSN
//Set ..Adapter.ConnectAttrs = "QueryTimeout:45" ; try this too just in case...
Set ..%Row.MaxRowsToGet = -1
Quit$$$OK
}When I try to compile, I am getting a %Row does not exist in this class.
As @Chandrasekar Angaiah pointed out you need to create a new class that extends EnsLib.SQL.InboundAdapter and then you use the new class instead of EnsLib.SQL.InboundAdapter.
Within that new class override OnInit(), something like:
Class My.SQL.InboundAdapter Extends EnsLib.SQL.InboundAdapter
{
Method OnInit() As%Status
{
Set sc=##super()
If$$$ISOK(sc) Set ..%Row.MaxRowsToGet=-1Quit sc
}
}