1. John Raghanti
  2. PowerServer
  3. Thursday, 31 October 2024 19:10 PM UTC

Hi! I'm running PB 2022 R3 Build 3391. We use Microsoft SQL Server as our database, and are in the process of converting our application to be used through PowerServer - it's not in production yet.

I ran into a weird situation and was wondering if there was a workaround or see if anyone has any advice.

I've got a table that has a datetime column (recorded_on) with a default constraint of getDate().

When the datawindow was created, the developer added recorded_on into the updateable columns. It has worked correctly in our client/server application without any issues.

Our QA team reported some issues of missing data and it led me to find that the recorded_on column was Null rather than populated. After testing, it only happened when someone was creating records through PowerServer.

SQL Server Profiler showed me that the following SQL was being run to insert data:

exec sp_executesql N'INSERT INTO [our_table] ([table_id], ..., [recorded_on], ...)
VALUES (@pp0, ..., @pp13, ...);'

Since the column was specified in the insert, it is causing the default constraint to be skipped.

We could have this issue in a lot of tables and a lot of datawindows. Is there any way to fix this at the PowerServer level or database connection properties? I really don't want to go to management and say we need to get a list of all tables and columns with default constraints and then go through thousands of datawindows to ensure that our product works the same in PowerServer.

Thanks!

Accepted Answer
John Raghanti Accepted Answer Pending Moderation
  1. Tuesday, 5 November 2024 12:32 PM UTC
  2. PowerServer
  3. # Permalink

It is fixed. They had me add DisableBind=1 to the DBParm and it cleared up my issue.

Thank you David Xiong and Appeon Engineering team for your support!

 
Comment
  1. John Raghanti
  2. Tuesday, 5 November 2024 23:24 PM UTC
Yes, maybe I need to read the discrepancies and workarounds really super carefully.
  1. Helpful
  1. Arnd Schmidt
  2. Wednesday, 6 November 2024 00:51 AM UTC
It seems that is internally set to 1 by default for the Client <-> DBServer stuff depending on your DBMS, but not for PowerServer Apps :-(

https://docs.appeon.com/pb2022r3/connection_reference/DisableBind.html
  1. Helpful
  1. Chris Pollach @Appeon
  2. Wednesday, 6 November 2024 15:39 PM UTC
Hi Everyone;

In my experiences with setting the DisableBind=1 can affect other DML statements already in your PB App that *were* working correctly before and now may not. So if you do decide to use this setting as a workaround, I would strongly suggest performing a full regression test of your App. I have been burnt in the past with this setting ON, So I thought that I should mention that aspect. Food for thought.

Regards .. Chris
  1. Helpful
There are no comments made yet.
David Xiong @Appeon Accepted Answer Pending Moderation
  1. Friday, 1 November 2024 09:34 AM UTC
  2. PowerServer
  3. # 1

Hi John,

 

We have noted the phenomenon you described and have begun analyzing it. We recommend that you submit this issue to our Support system (https://www.appeon.com/standardsupport/) so that we can follow up on the issue more conveniently and update you on our analysis progress. Thank you!

 

Regards,

David

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.