Are Host Arrays supported in OpenESQL ADO .NET managed code?

We want to improve the speed at which one of our programs can INSERT rows into a table. Host Arrays sounds like the way to go, but the documentation (.NET Host Variables in Managed Code) specifies that .NET Host Variables must be declared at the Record (01) level? Can we do "01 EMP-EMPNO OCCURS 25 TIMES STRING." in a EXEC SQL BEGIN DECLARE SECTION?
  • Verified Answer

    Yes this is supported. I just tested here with the following. The array must have a size and cannot just specify occurs any as this causes an error. BTW, EXEC SQL BEGIN DECLARE is not required when using OpenESQL.



           01 company-name-str  string occurs 5.
           01 company-contact-str string occurs 5.
           01 row-num pic s9(9) comp-5 value 5.
           procedure division.
               EXEC SQL 
                  CONNECT TO 'SQLADO32WA' 
               EXEC SQL 
                  for :row-num
                  FROM dbo.Customers A