
Declaring variables as Static vs Private/Public -- XML
You may want the same variable name used in a variety of
classes/functions/subs. This is why we have Private - it limits the
scope of the variable. However, you also sometimes want to exit a sub,
and come back to it but for it to keep the same value. This is when
we use Static. So we can have a Variable name used in a variety of
places, but each are seperate. Static allows the value contained in a
function/sub to be retained after exiting and then returning.
Hopefully all that made some sense...?
XML is greate if you have a database you want to connect to over the
internet, or if you want to provide a database to a Web form. Can I
suggest you read O'Rilieys Books on VB (Spelling incorrect). They
have a great section all about Web Forms, using XML as a database,
etc...
On Tue, 7 May 2002 19:42:08 -0400, "Matt Cullman"
Quote:
>If I declare a variable as Static in a Private Sub, it'll retain its value
>even when the procedure ends, so why should I use it over the Private/Public
>statement?
>Also, what (common) situations is XML used in? I'd like to use it for a
>database (assuming it can be used - in a practical manner - as such). I'm
>not familiar with it, so if someone could send me to a beginner's site,
>that'd be appreciated.