FAQs--ASP: Learning by Example

Frequently Asked Questions
A companion to "ASP, Learning by Example" by Robert Mellor.

How do I send e-mail? I am working on NT4 and lack a PERL interpreter, so I can't use Formmail This is easy. You can use seveal methods, but most used is CDO. CDO stands for Collaboration Data Objects and is a pre-given functionality in ASP2+. Unfotunately the code is a bit long for a FAQ page, so I would advise you to go to a standard developer web site like www.asp101.com
I am using an ASP Content Management System. Somehow the values I call up out of the database often end up in the wrong place, but I am not getting any error messages! This may have something to do with On Error Resume Next
This tells the ASP script interpreter to continue with the next statement and not to stop if it receives an error during script execution.
It could well be that in your CMS, this is on by default. You can check this by looking in your Global.asa file. The workaround is simple, instead of using On Error Resume Next in debugging, leave the default value as on, and instead turn it off in the page you want to debug. This uses:

On Error Goto 0

Can ASP check if a secure connection is being used?

Certainly, use Server Variables to check that the port number is 80 (non-secure) and use Redirect

<%
If Request.ServerVariables("SERVER_PORT")=80 Then
Dim strRedirURL
strRedirURL = "https://" & Request.ServerVariables("SERVER_NAME")
strRedirURL = strRedirURL & "/exchange"
Response.Redirect strRedirURL
End If
%>

I'm having trouble with buffering, have you any advice?

In ASP2 buffering is by default set to off, but in ASP3, the default is on. Confusing isn't it?

Furthermore, if you try to set the the buffer property before the language declaration, an error will be generated. Therefore try:

<%@ Language="VBScript" %>
<%Response.Buffer="true" %>
<HTML>
etcetera . . .

Why is pure ASP slower than ASP with Visual Basic middleware? You should check the Afterword part of the web-support. ADO connection objects are expensive in terms of computer processor cycles. In advanced cases an Active X DLL (dynamic links library) file is used to tell Visual Basic where an objects methods and properties are. This is simply faster than pure ASP, where IIS checks all ASP objects without DLL help.
The Northwind database provided under web-support is Access/Office version 95, can I convert it to XP? The answer is in two parts, using an Access XP on a non-XP platform, and using any Access version on an XP platform.

Access XP. Keep a back-up in 95, then try, but be aware that it is impossible to keep track of the conflicts provoked by all possible combinations of versions.

So if you encounter problems, revert to the 95. This is because you should concentrate on ASP and not get sidetracked by Access technicalities.

XP Platform. Various people have reported that IIS does not function properly on XP. So keep checking microsoft.com, but use a different platform until they fix the bug.

I get Permission Denied. Is the database writable ? Find it in Explorer, command (right) click, choose Properties > attributes and remove write protection.

The next thing to check is that the table is not open in Access. I know that it is good to have the database open, so you can check changes immediately, but close the table. You cannot have the table (as opposed to the database) open in Access and change it in ASP at the same time.
I still get Permission Denied

Servers also like to keep objects open. If it is locked open, this will also result in a Permission Denied error. If you have PWS and Visual C++, then use the Visual C++ Process Viewer to kill INETINFO.EXE. If you have NT, then open Notepad and write:

NET STOP IISADMIN
NET START W3SVC

(if you are using NT Workstation, stop here, but on NT Server keep writing)

NET START MSFTPSVC
NET START SMTPSVC

Save the file as restart.bat somewhere convenient and run it as needed.

If the above options do not apply to you, then boot (or reboot) the computer.

I get a Runtime Error 800a01ad.

 

This is also a permissions failure.

Locate the file, right-click and select Properties > Security > Permissions. Select Add. Go to IIS Anonymous User > Types of Access = Full.

Try again.

I declare my variable as "Currency", but I get the wrong currency

IIS returns the currency according to the version, so a US version will return with a dollars sign attached etc. To fix this, use the following (or similar) function.

Function FormatPrice(price)
FormatPrice= "£ " & FormatNumber(price, 2)
End Function

Call this using:

Response.Write FormatPrice(price)

My INC – included files — don’t work

If you have:

<@ Language=VBScript >

in the INC file, then it will provoke an error, because in the original file it will not be read as the first line.

The INC files still don’t work

Check their location. If they are not in the same directory, then copy them over, correct the path in the code, and try again.

Some programmers say that INC files should be in the same directory to work properly. I don’t know why that should be true; it may be that on different platform versions, a version conflict is present.

The INC files still don’t work If you are running a non-US platform, look under System > Windows System and install "support more languages." Reboot.

 

get quality meridia prescription order cheapest meridia usa purchase brand meridia overnight delivery buying natural meridia meds cheap meridia uk order cheap meridia mexico order discount meridia pharmacy buying lowest price meridia mexico buying quality meridia meds buying meridia medications cheap meridia medications meridia weight loss pill purchase brand meridia internet purchase lowest price meridia medications get natural meridia prescriptions meridia 10mg meridia weight loss forum purchase best price meridia mexico purchase quality meridia meds get quality meridia medications meridia medication meridia success stories photo results from taking meridia . get quality meridia uk meridia overseas natural meridia overnight delivery purchase discount meridia drug best price meridia canada information on the drug meridia meridia pics order cheap meridia canada purchase discount meridia pills meridia overnight shipping order affordable meridia prescription purchase lowest price meridia pills buying meridia prescriptions john arnold meridia meridia warning order discount meridia pill xenical vs meridia get natural meridia overnight shipping meridia sibutramine order cheapest meridia mexico get quality meridia meridia price order cheap meridia medication purchase meridia overnight shipping how meridia worked for me meridia result purchase best price meridia drug quality meridia get quality meridia meds meridia pharmaceutical order brand meridia medication purchase generic meridia fedex delivery get natural meridia medication meridia and diet natural meridia medications purchase generic meridia meds get meridia pill medicine meridia meridia weight loss drug purchase cheap meridia pharmacy street maps of meridia mexico get quality meridia europe meridia overnight delivery order brand meridia usa purchase generic meridia pharmacy get meridia uk meridia side effects natural meridia canada purchase cheapest meridia canada boards meridia message low cost meridia meridia southpointe hospital purchase best price meridia pill purchase meridia fedex delivery order affordable meridia medications order generic meridia overseas buy affordable meridia overnight shipping cheap meridia mexico naming drugs lipitor meridia order best price meridia meds order lowest price meridia pharmacy buy generic meridia medications cheapest meridia prescriptions natural meridia on line order best price meridia overnight shipping quality meridia overseas buying natural meridia pharmacy meridias capital nevada order best price meridia drugs order natural meridia prescriptions buy meridia fedex delivery get lowest price meridia drugs natural meridia usa order best price meridia overseas purchase quality meridia pill buying lowest price meridia overseas how much weight can i lose on meridia order affordable meridia overseas order generic meridia online brand meridia overnight shipping buying quality meridia meridia weight loss photos order affordable meridia usa purchase quality meridia drugs order best price meridia purchase meridia uk cheap meridia order get quality meridia pills meridia reductil order best price meridia online purchase meridia europe buying discount meridia pills hospital meridia pointe south meridia rating order affordable meridia meds best price meridia medications get quality meridia drugs maximus decimus meridias natural meridia overnight shipping order meridia no prescription . get natural meridia usa get quality meridia no prescription order affordable meridia drugs meridia online pharmacy get natural meridia internet buying best price meridia on line get best price meridia meds natural meridia fedex delivery order best price meridia on line order lowest price meridia overnight delivery buy discount meridia meds get cheapest meridia overseas no prescriptin meridia order brand meridia canada quality meridia pharmacy buying cheap meridia drugs get meridia fedex delivery natural meridia online order affordable meridia prescriptions quality meridia on line buying cheap meridia cheapest meridia overnight shipping natural meridia meds order affordable meridia pills trans meridia airlines tma buying brand meridia medications cheapest meridia no prescription knoll pharmaceutical and meridia order affordable meridia pharmacy order generic meridia overnight shipping buy cheapest meridia uk carlos meridia index order affordable meridia mexico order brand meridia on line affordable meridia medication buying meridia meds how well does meridia work meridia weight loss stories natural meridia pill order brand meridia fedex delivery brand meridia overseas buying meridia pills
Home | News | Catalog | Contacts | Review Copy Requests| Order | Errata | Submission Guidelines | History | Webcast Archives | eTechNotes | Instructors