Prestwood eMag
Our monthly opt-in coupons+newsletter.
|
portal.prestwood.com
|
|
January 2012 - ASP Classic Edition
|
Year 14 Issue 1
|
|
|
|
Your full service technology partner!
|
|
Expert guidance from working professionals!
Language Basics topic (classic post):
Send email with ASPMail by Mike Prestwood
How to use ASPMail to send email from your web site.
|
Monthly ASP Classic Lesson
|
|
ASP Classic Topic:
Code Snippet of the Month
In ASP, using ADO, you use RecordSet.AddNew to add a new record, Recordset.Update to post the record, and RecordSet.Delete to delete it. To edit a record, you open the RecordSet using an editable cursor.
The following code snippet adds a record to a given editable RecordSet with FullName and Created fields:
objRS.AddNew
objRS.Fields("FullName") = "Barack Obama"
objRS.Fields("Created") = Now
objRS.Update
ASP Classic Topic:
Error: error 'ASP 0208 : 80004005'
Cannot use generic Request collection
/_private/footer_content.inc, line 72
Cannot use the generic Request collection after calling BinaryRead.
Explanation: Although you can use the generic request collection, as in Request("SomeValue"), for either Request.Form("SomeValue") or Request.QueryString("SomeValue"), it's best to avoid the generic request collection until it's really needed. The generic request collection causes problems in some circumstances. For example, you cannot call the generic request collection after a BinaryRead.
ASP Classic Topic:
Resource Link of the Month: VBScript Language Reference on Microsoft.com
The best resource for quickly looking up ASP Classic commands. Even better than having a reference book.
Language Details Topic:
Question: 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.
Language Details Topic:
Tip of the Month
Although you can use the generic request collection, as in Request("SomeValue"), for either Request.Form("SomeValue") or Request.QueryString("SomeValue"), it's best to avoid the generic request collection until it's really needed. Use a For Each loop to loop through elements.
|
|
|