Jorjo
Jorjo
CC#
Created by Jorjo on 12/4/2023 in #help
✅ IndexOutOfRangeException when trying to set class properties to reader return values
lmao
27 replies
CC#
Created by Jorjo on 12/4/2023 in #help
✅ IndexOutOfRangeException when trying to set class properties to reader return values
thanks again!
27 replies
CC#
Created by Jorjo on 12/4/2023 in #help
✅ IndexOutOfRangeException when trying to set class properties to reader return values
thanks for the help eitherway
27 replies
CC#
Created by Jorjo on 12/4/2023 in #help
✅ IndexOutOfRangeException when trying to set class properties to reader return values
I'll close the post down
27 replies
CC#
Created by Jorjo on 12/4/2023 in #help
✅ IndexOutOfRangeException when trying to set class properties to reader return values
It was a privilege issue, there are some procedures that create separate databases for each city and my fellow practician here forgot to update the prodecure to give it rights to the newly created database. It couldn't access it the whole time.
27 replies
CC#
Created by Jorjo on 12/4/2023 in #help
✅ IndexOutOfRangeException when trying to set class properties to reader return values
I've fixed it
27 replies
CC#
Created by Jorjo on 12/4/2023 in #help
✅ IndexOutOfRangeException when trying to set class properties to reader return values
ok
27 replies
CC#
Created by Jorjo on 12/4/2023 in #help
✅ IndexOutOfRangeException when trying to set class properties to reader return values
with the same exception
27 replies
CC#
Created by Jorjo on 12/4/2023 in #help
✅ IndexOutOfRangeException when trying to set class properties to reader return values
crashed right after i stepped over the Name property being set to the reader return value
27 replies
CC#
Created by Jorjo on 12/4/2023 in #help
✅ IndexOutOfRangeException when trying to set class properties to reader return values
I put it anyway
27 replies
CC#
Created by Jorjo on 12/4/2023 in #help
✅ IndexOutOfRangeException when trying to set class properties to reader return values
No description
27 replies
CC#
Created by Jorjo on 12/4/2023 in #help
✅ IndexOutOfRangeException when trying to set class properties to reader return values
anyway here:
27 replies
CC#
Created by Jorjo on 12/4/2023 in #help
✅ IndexOutOfRangeException when trying to set class properties to reader return values
Oh well yeah I tried debugging it, hence why when I use an index for the column instead of the alias it gives me the weird value of 916 I got that from debugging the property being set to that but since I'm using the stored procedure alias it just gives a value of null and crashes due to me removing the exception handling logic. But do you need me to check the reader's values instead?
27 replies
CC#
Created by Jorjo on 12/4/2023 in #help
✅ IndexOutOfRangeException when trying to set class properties to reader return values
This is supposed to create a new object with it's property values set to what the reader returns then later add the new objects with their respective values to a list which will be used in a for loop to itterate the property values and display information inside some paragraph elements and such. However despite the stored procedure working and returning the right results based on the city name it causes an exception to occur which is the attached image to this post. I tried doing exception handling as well but the exception message when printing to the debug console is simply just "ProductName" which is weird to say the least. The column names are written correctly but it still returns null no matter what, except when indexed, then the Name property gets the value of 916.
27 replies