1. Sreekanth Thorpunuri
  2. PowerBuilder
  3. Monday, 18 November 2024 11:22 AM UTC

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?

 

Note: The reason for ADO.NET is that we also have C# code, which is already using ADO.NET.

And the version of PowerBuilder is PowerBuilder 2022 R3 (IDE & Runtime version is Version 2022 R3 Build 3391)

Who is viewing this page


There are no replies made for this question yet.
However, you are not allowed to reply to this question.