1. Topher Chen
  2. PowerBuilder
  3. Thursday, 23 May 2019 07:15 AM UTC

Dear All,

 

Can you please help me with a query, do you know how to use connection pool for the program in .Net Assembly? any clue would help, please!

 

 

Topher Chen Accepted Answer Pending Moderation
  1. Monday, 27 May 2019 09:26 AM UTC
  2. PowerBuilder
  3. # 1

Hi Chris,

Thanks for your reply.

I used the following code to connect, does it like right?

 

sqlca1= create transaction
sqlca1.DBMS = "ADO.NET"
sqlca1.LogPass = "123"
sqlca1.LogId = "abc"
sqlca1.dbparm="Namespace='Sybase.Data.AseClient',Database='test',DataSource='xxxxx,10061',ADORelease='1.15.325.0',PROVIDERSTRING='Pooling=TRUE;  Max Pool Size=1; Min Pool Size=1; Connection Lifetime=120;Connection Timeout=60;Incr Pool Size=1;Decr Pool Size=1;'"
connect using sqlca1 ; 

Comment
There are no comments made yet.
Chris Keating Accepted Answer Pending Moderation
  1. Thursday, 23 May 2019 14:58 PM UTC
  2. PowerBuilder
  3. # 2

There should be no additional work needed as connection pooling is enabled by default in .NET generally. This may be impacted by the specific .NET driver that is being used.  For example, if you are using the .NET Framework Data Provider for ODBC is controlled by the ODBC Administrator.

 

 

 

 

Comment
  1. Sally D
  2. Thursday, 30 May 2019 10:54 AM UTC
Hi Chris, when i use the same method in the assembly, the error occurs as

'Could not load file or assembly 'Sybase.AdoNet2.AseClient, Version=2.155.1015.0, Culture=neutral, PublicKeyToken=95d94fac46c88e1e' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040) ---> System.IO.FileLoadException: Could not load file or assembly 'Sybase.AdoNet2.AseClient, Version=1.15.325.0, Culture=neutral, PublicKeyToken=95d94fac46c88e1e' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)'



It is strange because i set the namespace as ''Sybase.Data.AseClient'', but the error relate to ''Sybase.AdoNet2.AseClient''
  1. Helpful
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.