I am using the configuration below to connect to the database using the ADO.NET provider, and it connects successfully.
// Profile ADOTest
SQLCA.DBMS = "ADO.Net"
SQLCA.LogPass = <**************>
SQLCA.LogId = "***"
SQLCA.AutoCommit = False
SQLCA.DBParm = "Provider='SQL Server',DataSource='SQL Server 2022',Database='ADO_Database'"
But when we called SQLCA.sqlnrows from the GetSQLCACode method, it returned zero. So, we can't implement the CURSOR in our application with the ADO.NET provider.
------------------------------------------
GetSQLCACode (){
i_code = SQLCA.sqlnrows
}
------------------------
DECLARE list CURSOR FOR
SELECT id
FROM sampletable
order by id;
ll_count = 0
Open list ;
DO WHILE TRUE
FETCH list INTO :ll_entity_id;
IF access.GetSQLCACode (SQLCA) > 0 THEN EXIT
ll_count ++
l_pbd_entity_id[ ll_count ] = ll_entity_id
Loop
Close list ;
Can you please let us know how to check SQLCA.sqlnrows and which parameters need to be provided for the ADO.NET provider?