I'm trying to create an array of objects based on some code by DB McGee in an earlier post and I'm having issues. Once the for loop is complete, my objects no longer contain any data. To be more specific, there are five Response.write lines that I'm using for testing purposes. The first four all return data. The last one ("herewego:" ) does not. I'm sure I'm missing something stupid, but I can't waste any more time on this. There is no error, just emptyness. The code is below. Any help would be appreciated! Thanks!!!
Code:
function fHolidays(holidays, date, state) {
this.holidays = holidays;
this.date = date;
this.state = state;
}
// store each object in an 'array of objects':
var myHolidays = new Array();
var jsHolidaysList = getADOObject("EXECUTE pHolidaysList");
iCount = jsHolidaysList.recordCount;
for (i=0; i<iCount; i++) {
myHolidays[i] = new fHolidays(jsHolidaysList("Holidays"), jsHolidaysList("Date"), jsHolidaysList("State"));
Response.write("Holidays: " + myHolidays[i].holidays + "<br>");
Response.write("Date: " + myHolidays[i].date + "<br>");
Response.write("State: " + myHolidays[i].state + "<br>");
Response.write("i: " + [i] + "<br>");
jsHolidaysList.moveNext();
}
jsHolidaysList.close();
jsHolidaysList = null;
Response.write("Herewego: " + myHolidays[0].holidays);
Comment