1. Roland Smith
  2. PowerBuilder
  3. Wednesday, 26 August 2020 17:02 PM UTC

We recently moved from PB 12.5 to PB 2019 GA.

We noticed that the database painter is adding dbalias to the datawindow source as below:

name=id_num dbname="trans_hist.id_num" dbalias=".id_num" )

I went back to the PB 12.5 and I see it a lot there.

Is there a reason for this? Is there a database profile setting it depends on or is this something the painter started adding for all?

Mark Lee @Appeon Accepted Answer Pending Moderation
  1. Thursday, 27 August 2020 08:37 AM UTC
  2. PowerBuilder
  3. # 1

Hi Roland,

 

It seems to be a Sybase (legacy) bug. 

I suggest please kindly report this problem to our ticket system:https://www.appeon.com/standardsupport/newbug  so it can be properly received and tracked. 

And please also provide a sample PB test case (with PBT / PBL) when you submit it to the ticket system.

 

Regards,

 

Comment
  1. Roland Smith
  2. Thursday, 27 August 2020 12:43 PM UTC
I did some more research. This was a feature added in PB 10.5. According to the new feature help topic it is supposed to indicate the table name alias used in the SQL. In my experience it is always dbalias=".column_name" so would the bug be that the alias portion to the left of the period is missing?
  1. Helpful
  1. Roland Smith
  2. Thursday, 27 August 2020 13:14 PM UTC
I was able to find one that had the alias name correctly. The bug seems to be that it is adding dbalias when there isn't an alias in the SQL. I will submit a bug with examples.
  1. Helpful
There are no comments made yet.
mike S Accepted Answer Pending Moderation
  1. Wednesday, 26 August 2020 18:33 PM UTC
  2. PowerBuilder
  3. # 2

I'm probably wrong but:

 I think it may be related to an enhancement request made to sybase to know the aliased table.columname - the real actual table name and column name for the datawindow column, as well as the names used in the select. 

for example:

select table1.col1 A, table2.col1 B

from table table1

join table table2 on table1.joinid = table2.otherid

 

the dbname in the datawindow would reference the alias which is not the actual column/table name. 

If you want to get the real table name/column name there would be no way to get it outside of parsing the sql.  i believe that the dbalias was an attempt to provide that information?  (it never worked correctly.)  

in any case, the ideal would be to have the table1_A as dw field name (or #1), and use that to get things such as the table alias (table1), the real table (table), the aliased column name (A), and the real column name (col1)  

 

Comment
There are no comments made yet.
Govinda Lopez @Appeon Accepted Answer Pending Moderation
  1. Wednesday, 26 August 2020 18:05 PM UTC
  2. PowerBuilder
  3. # 3

Hi Roland,

 

Is this only happening if you try to migrate from an older version?

 

 

Regards,

Comment
  1. Roland Smith
  2. Wednesday, 26 August 2020 18:22 PM UTC
It appears that the DW painter is adding it when we edit really old datawindows. We first noticed it under 2019 but when I searched the 12.5 code, it is there in a lot of datawindow objects.
  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.