Type mismatch error '800a00d' in Session Variable with Array
Posted on 2009-07-09
Background: We have a Web Application we use internally on a NT 4 box with IIS and SQL Server. Years ago I programmed a web application in Active Server Pages to access and collate this data into reports. Worked great for us for years and years. Note we are a relatively small office and I am not an IT guy. But I have an engineering degree, did a lot of reading, and was able to piece it all together.
Fast forward to the present. The NT 4 box is on its last leg so we upgraded to a Win Server 2003 with the later version of IIS.
There seems to be quite a different in coding. I am getting a type mismatch error with the following code (note worked fine on NT 4 box):
Session("SubjEnt") = TheSubject
dim TempSubject(16) 'note I added the '(16)' to get rid of a previous type mismatch
TempSubject = Session("SubjEnt") 'here is where I get the type mismatch
Note the weird thing is I later have the line
Session("SubjEnt") = TempSubject
And I get no type mismatch with this line (if I comment out the other line). I can't tell if Session("SubjEnt") is getting all the values, however, because of the line commented out.