Database: Fix/database query activities failing parameters conversion from DBNull (71685)#445
Open
theloginerror wants to merge 2 commits intoUiPath:developfrom
Conversation
viogroza
reviewed
Oct 17, 2024
| } | ||
| else | ||
| { | ||
| currentParam.Set(asyncCodeActivityContext, null); |
Collaborator
There was a problem hiding this comment.
I would remove the condition on else
if there is nothing to set, I would not set null; (this is a business requirement)
for example if I have a in/out param with the initial value 100, then the procedures value for the param is DbNull.. do we want to set to zero the value in this case? or let it as it was? we can use default instead of null if needed
also null assignment wouldn't work if the type is a value type (eg. integer or bool);
eg.:
object o = null;
bool v = (bool)o;
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixed ExecuteQuery and ExecuteNonQuery throwing an exception when trying to convert the parameter of type DBNull returned by the query:
A value of type 'System.DBNull' cannot be set to the location with name 'Argument1' because it is a location of type 'System.String'https://uipath.atlassian.net/browse/STUD-71685