QUESTION: With the recent PowerBuilder 2022 R2 update of ADO.NET, is PowerBuilder now enforcing rules that were not previously enforced?
What is described below WAS NOT a problem with PowerBuilder 2022 R1...but with the release of PowerBuilder 2022 R2, I am seeing some errors in a deployed application like what is shown below (Procedure or function '' expects parameter...which was not supplied.)
I have determined that the issue is experienced by datawindows having a data source argument named "prefix" as seen below.
The fix for this problem is to go into the source of a datawindow and change the name of the argument to something other than "prefix".
EDIT: The fix for this problem is to go into the source of a datawindow and change the name of the argument to MATCH the name of the stored procedure parameter.
Some additional information...
- this application IS using the ADO.NET database driver (has been for years)
- the target machine has .NET 6 Desktop Runtime installed
- building the application using PowerBuilder 2022 R3 does not change the behavior
- database is SQL Server (I think 2012 but might be 2016)
I appreciate any and all input.
We’ve reproduced the issue you described. We reproduced in the following two scenarios. Please confirm if you match either of the two.
DataWindow source syntax snippets:
Syntax 1:
PB2022 R2 doesn’t report an error
procedure="1 execute dbo.CRbug_Pro_parName_Incorrect;1 :int_test, :bint_test,:bit_test" arguments=(("int_test", number),("bint_test", decimal),("bit_test", number)) )
PB2022 R2 reports an error
procedure="1 execute dbo.CRbug_Pro_parName_Incorrect;1 :inttest, :bint_test,:bit_test" arguments=(("inttest", number),("bint_test", decimal),("bit_test", number)) )
Syntax 2:
PB2022 R2 doesn’t report an error
procedure="1 execute dbo.CRbug_Pro_parName_Incorrect;1 @int_test = :int_test, @bint_test = :bint_test, @bit_test = :bit_test" arguments=(("int_test", number),("bint_test", decimal),("bit_test", number)) )
PB2022 R2 reports an error
procedure="1 execute dbo.CRbug_Pro_parName_Incorrect;1 @int_test = :inttest, @bint_test = :bint_test, @bit_test = :bit_test" arguments=(("inttest", number),("bint_test", decimal),("bit_test", number)) )
To better track the issue and timely update you, please submit a ticket at https://www.appeon.com/standardsupport/newbug. Once the fix is available, we will promptly update you.
Regards
Angie