1. Fabio Pontel
  2. PowerBuilder
  3. Tuesday, 10 October 2023 16:55 PM UTC
Using SetAdoConnection() with SqlAnyWhere in Pb2022R2 occour appcrash when call "connect using sqlca";

My Code : (CPU : Windows 11 Pro - 22621.2283) 
 
//////////////////////////////////////////////////
// My code in Pb2022 R2:
//////////////////////////////////////////////////
boolean         lb_retVal
long            ll_return, ll_result
dotnetobject    lcs_obj
dotnetassembly  lcs_ass

lcs_obj = create dotnetobject
lcs_ass = create dotnetassembly

ll_return = lcs_ass.LoadWithDotNet("C:\Codes\PoderAdoDb.dll")
if ll_return < 0 then
    messagebox("Fail - Open PoderAdoDb.dll",lcs_ass.errortext)
    return
end if

ll_return = lcs_ass.createinstance("PoderAdoDb.PoderDbConnect",lcs_obj)
if ll_return < 0 then
    messagebox("createinstance failed",lcs_ass.errortext)
    return
end if

lb_retVal = SQLCA.SetAdoConnection(lcs_obj.odbcSql)

if lb_retVal then
    connect using SQLCA; // <- APPCrash pb220.exe  //////////////////
    if sqlca.sqlcode <> 0 then
       messagebox("Error",sqlca.sqlerrtext)
    else
        select count(*) into :ll_result from dba.empresa;
        messagebox("Result",ll_result)
    end if
else
    messagebox("","Fail - SetAdoConnection")  
end if
//////////////////////////////////////////////////
// End - Code Pb2022 - r2
//////////////////////////////////////////////////



//////////////////////////////////////////////////
// My code in C#- SnapDevelop:
//////////////////////////////////////////////////
using Appeon.DB.Sharing;
using System.Data.Odbc;

namespace PoderAdoDb
{
    public class PoderDbConnect
    {
        public IAdoConnectionProxy odbcSql { get; set; }
        public OdbcConnection sqlcon;
        private string connection = "Dsn=OFF17";        
       
        public PoderDbConnect()
        {
            sqlcon = new OdbcConnection(connection);
            sqlcon.Open();
            odbcSql = new AdoConnectionProxy { Connection = sqlcon };
        }      
    }
}
//////////////////////////////////////////////////
// End code in C#- SnapDevelop
//////////////////////////////////////////////////
Angie Liu@Appeon Accepted Answer Pending Moderation
  1. Monday, 8 April 2024 07:08 AM UTC
  2. PowerBuilder
  3. # 1

Hi Fabio Pontel, 

Good news that PowerBuilder 2022 R3 MR(build 3356) is available for download. The issue you reported has been fixed in this release. Please download and install it to verify the issue you reported and let us know if any problems. You can get the installer from our Downloads portal at https://account.appeon.com/download (login required).

We welcome all feedback from you!

Regards,

Angie

Comment
There are no comments made yet.
Fabio Pontel Accepted Answer Pending Moderation
  1. Friday, 20 October 2023 20:50 PM UTC
  2. PowerBuilder
  3. # 2

Here code (and database Anywhere 17) about this case.

Attachments (1)
Comment
  1. Angie Liu@Appeon
  2. Tuesday, 9 January 2024 09:57 AM UTC
Hi Fabio Pontel,



Sorry for keeping you waiting.



Thank you for providing the case; we have reproduced the issue using the case you provided and are currently analyzing it.



To facilitate the immediate processing of updates to your issue, we recommend that you submit a ticket.



Regards,



Anige
  1. Helpful
There are no comments made yet.
Angie Liu@Appeon Accepted Answer Pending Moderation
  1. Thursday, 12 October 2023 10:26 AM UTC
  2. PowerBuilder
  3. # 3

Hi Fabio Pontel,

 

We used the code you provided to create a case. It didn’t crash but instead popped up messagebox("","Fail - SetAdoConnection"). I suggest you open a ticket for this so that we can further communicate and analyze this problem.

In the ticket, please help provide the following information:

  1. A case that can reproduce this problem.
  2. The dependency library version used by the C# part.
  3. The error message displayed in the OS: Event Viewer after the application crashes.

 

Attaching the PB2022R2 ADO shared transaction help link here:

https://docs.appeon.com/pb2022r2/connecting_to_your_database/XREF_25339_Sharing_ADO_NET.html

 

Regards

Angie

Comment
There are no comments made yet.
  • Page :
  • 1


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