Customer Login  .   Webmail Login  .   About Us  .   Contact Us
Go to: Articles List

Application Object Explained

The Application object is used to share information with all users of your application. When you set an Application Variable, that same variable is accessible throughout your application. An example of this would be to set an Application Variable for your database connection string:

Application("ConnStr") = "DRIVER={Microsoft Access Driver (*.mdb)};DBQ=G:\path\yourdb.mdb;"

The above code sets an Application Variable named "ConnStr" equal to the database connection string. It can then be accessed like this:

myDBConnStr = Application("ConnStr")

The above code sets a variable "myDBConnStr" equal to the Application Variable "ConnStr". It can then be used to connect to the database.

Similar to the above use you can use Application Variables to keep track of various commonly used information (paths, common urls, etc).

There are two methods that will help you use Application Variables:

Application.Lock - Prevents more than one user at a time from modifying a particular variable.
Application.UnLock - Unlocks the variables so that they can be used by another user.

An example of this would be if you had a statement that was going to be modified regularly and you wanted to keep track of the date and time that it was modified. After each time that it was changed you could set an Application Variable:

Application.Lock
Application("ModifiedDate") = Now
Application.UnLock

Shared Hosting
Rookie
Pro
Advanced
Dedicated Servers
BASE
BUSINESS
ENTERPRISE
Why Choose Brinkster?
Radical Support
Brinkster Datacenter
Brinkster Network
Corporate Social Responsibility
90 Day Money Back Guarantee
Unsurpassed Value
Client Testimonials
Additional Features
Antivirus
Merchant Account
E-Commerce
Live Chat Communicator
Free Firewall
Website Builder
Free Web Hosting
Support
General Support
Codebank Search
Forums
Articles
Click here for Brinkster Live Chat
Home   Domains   Shared Hosting   Dedicated Hosting   Partner   Support   About Us    Contact Us   Webmail
Copyright © Brinkster Communications Corporation All Rights Reserved. Privacy Policy & Legal