1. Alex Hernandez
  2. PowerBuilder
  3. Tuesday, 5 July 2022 10:11 AM UTC

Hello,

I'm working in one of our customer's office, with a Powerbuilder 2019 R3 connected to a SQL Server 2016 database. When I try to modify the Update Properties of a datawindow after adding a new column, it says that the table cannot be found. And obviously the table exists, as I've been able to add the column in the query.

When I first clicked the "Primary Key" button it didn't worked, so I marked the primary key by hand, and then when I clicked the "OK" button I got the error.

Is this anything related with permissions of the user I'm using to connect to the database? Maybe it needs access to system views to get the information of the tables?

Thank you in advance.

 

 

Alex Hernandez Accepted Answer Pending Moderation
  1. Wednesday, 6 July 2022 08:05 AM UTC
  2. PowerBuilder
  3. # 1

Thanks for responding. They have told me that they have migrated the version of the database recently. The user is the same but maybe they forgot something... I've seen that the Catalog Owner in the connection is different than the user that connects.

If I write in the query a prefix with the table like "SELECT * FROM dbo.TABLE WHERE ..." then the Update Properties dialog works, but if I remove the prefix then fails. That didn't happen in the last version of the database, it worked without the prefix.

The trouble is that I'm working in an ERP with more than 7K datawindows and hundreds of tables, so I have to find another way than adding prefixes in the queries.

I've managed to save the datawindow and it seems to work properly, the datawindow updates the fields correctly. So I can continue working, but it would be interesting to guess what happens.

Could be that now the tables belong to an specific user and before was not the case?

Thanks!

Comment
  1. Olan Knight
  2. Wednesday, 6 July 2022 16:43 PM UTC
I have seen this before.

In my case we have PUBLIC SYNONYMS for every table. Also, no table name is duplicated across all schemas.

If you don't have them already, put into place PUBLIC SYNONYMS for all tables. That will solve the issue you mentioned above where the schema name is required for a SQL command to work.
  1. Helpful
  1. Alex Hernandez
  2. Thursday, 7 July 2022 13:14 PM UTC
I've sent this message to the customer's database department, I'll wait for their response. Thank you very much for the information!



  1. Helpful
  1. Andreas Mykonios
  2. Thursday, 7 July 2022 14:00 PM UTC
It's an nice thing to have synonym. Unfortunately not all databases support it. But SQL Server does...

Andreas.
  1. Helpful
There are no comments made yet.
Olan Knight Accepted Answer Pending Moderation
  1. Tuesday, 5 July 2022 15:41 PM UTC
  2. PowerBuilder
  3. # 2

Look at your Database Profile and ensure it has been set correctly on ALL of the tabpages.

In our case, for example, we have a named schema that hosts the PB Catalog tables:

Comment
There are no comments made yet.
Andreas Mykonios Accepted Answer Pending Moderation
  1. Tuesday, 5 July 2022 10:23 AM UTC
  2. PowerBuilder
  3. # 3

Hi.

Is this anything related with permissions of the user I'm using to connect to the database? Maybe it needs access to system views to get the information of the tables?

Do you use different user than when you originally created the datawindow? If yes this user does have privileges to use that table? This table belongs to db owner or to a specific user? If it belongs to a specific user, then you may need to prefix table name with user (user1.proyecto). You SQL statement has any prefix in the from clause for that table?

Andreas.

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.