Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

erase array

Status
Not open for further replies.

vasah20

Programmer
Feb 16, 2001
559
US
In my ASP Application I'm assigning arrays to Application variables. These arrays are defined by month, so every month a new Application-scope array is created. What I want to do is erase the previous month's Application-scope array, but I get a type mismatch error.

here's a code sample.
Code:
 sMonth = Month(date)
 Response.Write "isArray: " &isarray(Application("special_" &sMonth))
 erase Application("special_" &sMonth)

here's the output:

isArray: True
Microsoft VBScript runtime error '800a000d'

Type mismatch: 'erase'

/modace/specials.asp, line 25


Application("special_" &sMonth) is a two-dimensional array, i don't know if that will help you.

thanks in adv.
 
First let me qualify my statements by saying I'm not SURE this will work, BUT I would try setting them equal to nothing like:
Code:
set application("special_" &sMonth) = nothing

I hope this works!:)
Paul Prewett
 
Erase works like un-dim-ing a variable and you cannot undim the application object. Yours,

Rob.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top