I.T. Discussion Community!
-Collapse +Expand
ASP Classic
Search ASP Classic Group:

Advanced
-Collapse +Expand ASP Classic Store

Prestwood eMagazine

August Edition
Subscribe now! It's Free!
Enter your email:

   ► KBASP Classic Knowledge Base  Print This    All Groups  

ASP Classic FAQ Page

These FAQs are contributed by you (our online community members). They are organized by our knowledge base topics. Specifically, by the ASP Classic sub-topics.

Contribute a FAQ
Expand All

4 ASP Classic Coding FAQs

Group: ASP Classic Coding


Topic: ASP Classic

-Collapse +Expand Q1. 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
Posted By Mike Prestwood, Post #100713, KB Topic: ASP Classic
-Collapse +Expand Q2. What does VBScript stand for?
 
Answer: VBScript is short for Visual Basic Scripting. VBScript brings scripting to a wide variety of environments, including Web client scripting in Microsoft Internet Explorer and Web server scripting in Microsoft Internet Information Service. It is used in Visual Basic, Access, Word, Excel, ASP, etc.
Posted By Mike Prestwood, Post #100783, KB Topic: ASP Classic



Topic: Tool Basics

-Collapse +Expand Q3. Can you edit Access and MS SQL Server views?
 
Answer:

Although this question really depends on the provider, in general, the answer is no to MS Access views and yes to MS SQL Server views so long as you open the RecordSet editable.

Posted By Mike Prestwood, Post #100800, KB Topic: Tool Basics



Topic: Language Details

-Collapse +Expand Q4. What is the syntax in ASP Classic for using an associative array?
 
Answer:

Use a dictionary:

Dim StateList
 
set StateList = Server.CreateObject("Scripting.Dictionary")
StateList.Add "CA", "California"
 
Response.Write "NV is " & StateList("NV")

For more examples, refer to our ASP Classic Associative Array (Scripting.Dictionary) article.

Posted By Mike Prestwood, Post #101199, KB Topic: Language Details
Follow PrestwoodBoards on: 


©1995-2019 PrestwoodBoards  [Security & Privacy]
Professional IT Services: Coding | Websites | Computer Tech