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? If so, is there a better way?
1. It is probably true, you should not have a variable this long anyways. 2. No, most variables will die after the page is loaded. You do want to close connections that can be persistent though (like FSO, and DB, and COM's etc..). Generally dispose and define as nothing (rs.Close() then Set rs = nothing) 3. Lock the file prior to changing it.
THANKS. about the FSO part - I don't totally follow your "lock before edit" solution. Basically, i completely delete the file, and rewrite it as the same filename. Can you point me to a resource on this, or explain in a little more detail please? Should I do this: 1 - lock existing file 2 - open it for editing 3 - delete its contents 4 - write the new contents 5 - save the file 6 - unlock ????? Does this keep the original version for http requests while im editing it?