paddling a canoe... with a tennis racket


Programming Web with ASP/VBS is like paddling a canoe... with a tennis racket.

I am so frustrated. (explanation for all of you geeks out there) I have been programming ASP pages and discovered that a certain instance of a variant (root of all evil) in VBS can be:
- neither an object, Null, nothing, zip, nada
- nor have any length, not nothing, not zero, not a Null length.
I cannot detect it with any comparison, as if somebody erased all reference of it from the memory.
I call it varBlackHole.

Recipe for this varBlackHole?

Pull a Null from MS SQL, stuff it into an Scripting.Dictionary Object (e.g. objDict("myDBNull") ), pass that reference to a function as regular variant (e.g. funFunCheckValue( objDict("myDBNull") ) ).

Function funFunCheckValue( varBlackHole )
   ' Hello World! I am a varBlackHole variant and I am absolutely useless!
   funFunCheckValue = varBlackHole
End Function


As an Amazon Associate I earn from qualifying purchases.

No comments:

Post a Comment

Post Scriptum

The views in this article are mine and do not reflect those of my employer.
I am preparing to cancel the subscription to the e-mail newsletter that sends my articles.
Follow me on:
X.com (Twitter)
LinkedIn
Google Scholar

Popular Recent Posts

Most Popular Articles

apt quotation..