1. Krishna Mohan Gullap
  2. PowerBuilder
  3. Friday, 12 July 2024 11:05 AM UTC

Is there a way I can check if a DataWindow Column is referencing a column in another table?

 

For example, I have 2 tables - Cust Master, and Cust Master State and the Cust Id in the Cust Master State table has a foreign key referencing to the Cust Id column iin Customer Master table. Not sure if there is a way to find out if Cust Id column in Cust Master State has the foreign key property?

Any suggestions?

 

Thanks,

Krishna

Accepted Answer
Chris Pollach @Appeon Accepted Answer Pending Moderation
  1. Monday, 9 December 2024 17:29 PM UTC
  2. PowerBuilder
  3. # Permalink
Yes, that restriction is not uncommon. FWIW: When I have done this before, I used a 2nd Transaction object with the UserID given to me specially by the DBA team that had System Table read only access. That seemed to appease the DBA team. Of course, I also found that a box of donuts along with that request never hurt either - LOL!
Comment
There are no comments made yet.
Chris Pollach @Appeon Accepted Answer Pending Moderation
  1. Friday, 12 July 2024 11:46 AM UTC
  2. PowerBuilder
  3. # 1

Hi Krishna;

  PB's DB Painter can show you all the foreign key relationships between tables & which columns graphically. Of course, there are lots of DB utilities too that can show you the DB's schema in a graphical format as well. 

Regards ... Chris 

Comment
  1. Chris Pollach @Appeon
  2. Friday, 12 July 2024 21:37 PM UTC
Yes, but you would have to query the System Tables (aka DB Schema) in your PB App. You can see everything about your DB using those tables.

However, your DB Login would require DBA authority to do this.
  1. Helpful 1
  1. Krishna Mohan Gullap
  2. Wednesday, 17 July 2024 13:55 PM UTC
Exactly, that was the only other way I could do this and not all end users would have their id mapped to the role which would have access to the system catalog !
  1. Helpful
  1. Krishna Mohan Gullap
  2. Wednesday, 17 July 2024 15:55 PM UTC
Perks, especially, donuts get the job done, like ALWAYS !!! I am trying to mark this suggestion as the solution for this question LOL
  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.