Hi all,
This is more a search for an explanation than a solution... though the explanation may help me avoid having to do multiple tests.
The basic problem is this:
-I read some Excel worksheet data into an array, which is 2 dimensional. Since I use it to update some tables in an Access table. I also update another software. I won't bore you too much with the details.
-Then need to test the 2nd and 3rd columns to see if there was data in the cell, since the code takes different routes depending on whether there is a value specified.
-I have to make sure the data is not just a space, so I also trim the value... my test looks like this:
This works... when the cell has no value, the array element returns empty, and all is well. Similar checks are performed on (i,1) and (i,2) along the way, but then later, the EXACT SAME test fails to detect the element is empty. I never modify the array in my code at all, yet a few lines of code further down, on the same iteration of the i-loop, rolls_array(i,3) is neither empty nor contains a null string, instead the element is NULL. So suddently I have to test for that too:![]()
Please Login or Register to view this content.
Not the end of the world, but it seems like something odd is going on. I realize I can work around this either by the null test, or just checking once at the start and using some boolean variables to control the flow, but most of all I wonder if anyone would know why an empty array element would return null later on, without modification of any kind?![]()
Please Login or Register to view this content.
TIA for any insight!
Arkadi
Bookmarks