Using sqlrowset on dynamic file driver

Has anyone managed to make it running?
I have this code, tried but doesn’t build the structure when prop:sqlrowset is used, but no errorcode or fileerrorcode

   MyDynamicFile &= NEW(FILE)
   MyDynamicFile{PROP:Driver} = 'ODBC'
   MyDynamicFile{PROP:DriverString} = '\TURBOSQL=TRUE'
   MyDynamicFile{PROP:Owner} = GLO:SQLConnectString
   OPEN(MyDynamicFile)
   IF SUB(CLIP(LEFT(p_SQLQuery)),1,4) = 'WITH'
      MyDynamicFile{PROP:SQLRowSet} = p_SQLQuery
   ELSE
      MyDynamicFile{PROP:SQL} = p_SQLQuery
   END
   FIXFORMAT(MyDynamicFile)
   !map columns
   DO DeepAssignColumns

Kind Regards,
Christian

That’s true. I changed {prop:SQL} to {prop:SQLRowSet} in DynFile.CreateFromSQL PROCEDURE (DynFile.clw) and FillVirtualListBox.sln example still works fine with predefined SQL SELECT queries against Northwind sample database.

Unfortunately, following CTE and stored procedure queries fail with errorcode 80 “Unsupported File Diver Function” using either {prop:SQL} or {prop:SQLRowSet} with Dynamic File Driver

WITH q (Records) AS (SELECT COUNT(*) FROM Products) SELECT * FROM q
exec dbo.CustOrderHist 'VINET'
1 Like