1. Samuel Sanchez Avila
  2. PowerBuilder
  3. Friday, 15 July 2022 16:18 PM UTC

Hello

 

We have an engine in PB19, which have threads and SQLCA.. SQLCA.DBMS = "SYC Sybase System10", this Engine is workinf kind of find

But,

Making the same engine in PB21, threads and SQLCA, we have some problems with SQLCA.DBMS with same parameter "SYC Sybase System 10"

          dbms not support in your current instalation

Engine without threads, only SQLCA with same DBMS parameter, works fine...

 

Does someone know why is this happening?

Thanks

John Fauss Accepted Answer Pending Moderation
  1. Monday, 18 July 2022 13:34 PM UTC
  2. PowerBuilder
  3. # 1

Samuel - 

Please tell us more about how your multi-threaded application manages the PB Transaction object(s).

Does each thread create/connect/destroy its own Transaction object, or is it using/reusing SQLCA?

If it's using SQLCA, please be aware that each thread uses it own, local copy of global objects (like SQLCA). Syntactically, there is no problem doing this, but threads work with global objects a little differently than what you are probably used to.

Threads cannot share a database connection, nor can they access the global objects in use by either the main (GUI) thread or by any other thread. PB gives each thread a copy of global objects and variables as if the application has just initialized and started execution. This is done for thread safety. Therefore, the SQLCA your app uses in the main/GUI thread is NOT the same SQLCA used in alternate execution threads.

I've written an article in the PowerBuilder section about multi-threading in PB that explains this (and other aspects of multi-threaded PB applications) you may find helpful:

   https://community.appeon.com/index.php/articles-blogs/tutorials-articles/2-powerbuilder/339-free-my-gui-multi-threading-in-powerbuilder

There is also an accompanying sample application in CodeXchange that shows one possible technique for retrieving data from a database with multi-threading.

   https://community.appeon.com/index.php/codeexchange/powerbuilder/307-a-multi-threaded-data-retrieval-example

Best regards, John

 

Comment
  1. René Ullrich
  2. Monday, 18 July 2022 13:52 PM UTC
I think you could be right. Cause the message does not says anything about the DBMS that is not support I guess the value is empty.
  1. Helpful
There are no comments made yet.
René Ullrich Accepted Answer Pending Moderation
  1. Monday, 18 July 2022 06:01 AM UTC
  2. PowerBuilder
  3. # 2

I don't know why this happens. You could try to use Process Monitor (by Sysinternals) to see how PowerBuilder is looking for the DLL in singlethreaded and multithreaded application.

Do you have your runtime folder in PATH variable or do you use the XML file to specify the runtime path. Maybe that is somthing wrong with PB if you use XML file (maybe if working directory is not the application directory?). If you use XML try to add the runtime folder to PATH to see if this works.

You should open a support ticket about this.

Comment
There are no comments made yet.
John Fauss Accepted Answer Pending Moderation
  1. Friday, 15 July 2022 17:24 PM UTC
  2. PowerBuilder
  3. # 3

This is probably NOT directly related to your issue, but the Adaptive Server Enterprise (ASE) database interface (SQLCA.DBMS="ASE") intended for use with Sybase ASE v15 and newer made it's debut in PB 11.0, in 2007. You did not state which version of ASE you are using, but you might wish to consider switching away from using an interface (SYC) that pre-dates PB 11.

Comment
  1. Samuel Sanchez Avila
  2. Friday, 15 July 2022 21:54 PM UTC
PBSYC.DLL and PBASE.DLL are in PB21 runtime Folder, and dosent work using SQLCA.DBS="ASE Adaptive Server Enterprise"...
  1. Helpful
There are no comments made yet.
Roland Smith Accepted Answer Pending Moderation
  1. Friday, 15 July 2022 17:14 PM UTC
  2. PowerBuilder
  3. # 4

Only the first three characters of SQLCA.DBMS are used. Those three characters are used to build the name of the DB interface dll. Something like this:

ls_dllname = "PB" + Left(SQLCA.DBMS, 3) + ".DLL"

The error message you are seeing is caused by the DLL not being found. Make sure PBSYC.DLL is included in the PB runtime folder and that Sybase Open Client is properly configured.

 

Comment
  1. Samuel Sanchez Avila
  2. Friday, 15 July 2022 21:53 PM UTC
PBSYC.DLL and PBASE.DLL are in PB21 runtime Folder, and dosent work using SQLCA.DBS="ASE Adaptive Server Enterprise"...
  1. Helpful
There are no comments made yet.
Chris Pollach @Appeon Accepted Answer Pending Moderation
  1. Friday, 15 July 2022 16:29 PM UTC
  2. PowerBuilder
  3. # 5

Hi Samuel;

  This error can normally be caused by two things ...

  1. You did not install the SNC Drivers from Microsoft for SS.
  2. You did not deploy the PBSYC.dll DB client "interface" driver (part of the PB runtime).

HTH

Regards ... Chris

Comment
  1. Samuel Sanchez Avila
  2. Friday, 15 July 2022 21:54 PM UTC
PBSYC.DLL and PBASE.DLL are in PB21 runtime Folder, it works for 1 instance, but for multi-threading dosent
  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.
We use cookies which are necessary for the proper functioning of our websites. We also use cookies to analyze our traffic, improve your experience and provide social media features. If you continue to use this site, you consent to our use of cookies.