Prestwood eMag
Our monthly opt-in coupons+newsletter.
|
 portal.prestwood.com
|
|
February 2012 - ASP Classic Edition
|
Year 14 Issue 2
|
|
|
|
Your full service technology partner!
|
|
Expert guidance from working professionals!
OOP topic (classic post):
ASP Classic Constructors (Class_Initialize) by Mike Prestwood
When an object instance is created from a class, ASP calls a special parameter-less sub named Class_Initialize. Since you cannot specify parameters for this sub, you also cannot overload it.
When a class is destroyed, ASP calls a special sub called Class_Terminate.
|
Monthly ASP Classic Lesson
|
|
ASP Classic Topic:
Code Snippet of the Month
ASP uses MoveFirst, MoveLast, MoveNext, and MovePrevious to move a database cursor (a RecordSet).
objRecordSet.MoveNext
The following snippet moves to the second to last record of a given RecordSet object:
objRecordSet.MoveLast
objRecordSet.MovePrevious
ASP Classic Topic:
Run ASP pages on Linux/Unix! This software was originally developed by ChiliSoft.
Sun Java System Active Server Pages software allows organizations to deploy Active Server Pages (ASP)-based web applications on a variety of web servers and operating systems. ASP applications currently supported by Microsoft IIS can now be powered by the Java System Web Server for increased security. Legacy ASP applications running on Windows NT can be transitioned to the Solaris Operating System for ongoing maintenance and support.
ASP Classic Topic:
Question: How do you find last Monday? I want to return a date for last Monday or today if today is Monday.
Answer:
While Weekday(ADate) <> vbMonday
ADate = DateAdd("d", -1, ADate)
WEnd
You could wrap this up in a function as follows:
Function SU_GetLastDOW(ADate, AWeekDayConst)
While Weekday(ADate) <> AWeekDayConst
ADate = DateAdd("d", -1, ADate)
WEnd
SU_GetLastDOW = ADate
End Function
Language Details Topic:
Tip of the Month
Call Application.Lock to freeze ASP code while you set IIS application variables the Application.Unlock to unfreeze. No actions take place on the server while locked.
Application.Lock
Application(YourAppVar) = AValue
Application.Unlock
|
|
|