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 Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

vbscript variable size, termination of.

Status
Not open for further replies.

gwrman

IS-IT--Management
Dec 20, 2005
94
CA
Three questions...

1) I read that a variable can only be 255 char, is this true, or is this only true of the variable NAME?

2) Is it best-practice to set every declared variable to "nothing" immediately after it is no longer needed?

3) I am using FSO to "publish" updated content to static file. my code goes like this:

a - delete current file
b - write new file

Will the millisecond (possibly more) cause noticeable problems if someone tries to call that file between the time i delete it and the time the new version is written?
 
1) Only apply's to variable name.
2) You only need to set objects to nothing. example your recordset and connection objects.
3) If any problems arise it's because IIS or something else still has a hold of the file and you wont be able to delete it. I would create a new file with date time stamp. Then have a job (vbs file) that runs at night deleting all other files, this also allows you to keep say maybe a weeks worth of files, in case you ever need to look at an older file.
 
thanks.

For the FSO question - what i'm writing are includes. SO - in page.asp i might include a file called someinclude.asp

Then, when I add/change data in the DB that pertains to what is in the include file, I rewrite the include file so that it has the fresh info. The filename, however, must always stay the same, since it is included in another file by that same filename.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top