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!
https://docs.appeon.com/pb2022r3/connection_reference/DisableBind.html
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