select
[UserFile].[DcdUserID] as [UserFile_DcdUserID],
[UserFile].[Name] as [UserFile_Name],
[UserFile].[GroupList] as [UserFile_GroupList]
from Erp.UserFile as UserFile
where (UserFile.DcdUserID = @USERID)
It worked on 10.2.700. We upgraded to 2022.1.23, and now it doesn’t. It returns no rows. If I remove the criteria, it returns all rows as one would expect (so I guess not a new security restriction). If I change the parameter to a constant, it works as expected. If I change the = to <>, it returns all rows including the USERID. It’s like the Parameter part is corrupting the comparison data for this one table only. (We have hundreds of other BAQs against other tables that seem to be working fine.)
I’ve deleted and reconstructed the BAQ from scratch but no change… Anyone have any suggestions?
Changing to LIKE and sending % as USERID returns… nothing
If I change it to the constant ‘%’, it returns all rows, as expected. It really seems like the parameters part is messed up… just in case someone sees something stupid I’m doing:
You’ve tripped over unhandled SQL injection. Change your parameter name, @USERID is colliding with a software variable or function name.
You can confirm that by making a calculated text field whose value is @USERID - but don’t create the parameter with that name. You’ll get your user ID back.