Create the future you want! Learn to make money online. Visit our website and start today! www.exclusivebizopps.com
Why do I get 800A0401 errors?
This error is encountered quite often by VB programmers venturing into VBScript. In VB, you can say this:
In VBScript in an ASP page, on the other hand, both the Dim line and the Next line will cause the following error:
To correct:
Make sure you only Dim variables in ASP, without using AS. VBScript only supports variants, so there is no need to support explicit typecasting.
Make sure you just use 'Next' instead of 'Next i'... VBScript does not need to keep track of the control variable (though my preference would be for it to just ignore such a statement, so that VB and VBScript would be that much more syntactically consistent).
Make sure you don't create a string like this:
This will cause the error as well, since there are too many quotes.
Make sure you don't mix JavaScript syntax into a VBScript page, e.g.:
(In newer versions of ASP, this actually produces a '0x800A000D Type Mismatch' error.)
Basically, look at the line of code the ASP error points to, and try to figure out if there's any syntax on that line that you copied from another environment (e.g. VB), from another machine with possibly a newer version of ASP, or from memory. Chances are, you copied or wrote code that won't work in your environment, or has a syntax error of some kind.
| Dim i As Integer For i = 1 to 10 Debug.Print i Next i |
In VBScript in an ASP page, on the other hand, both the Dim line and the Next line will cause the following error:
| Microsoft VBScript compilation error '800a0401' Expected end of statement /<file>.asp, line <line> |
To correct:
Make sure you only Dim variables in ASP, without using AS. VBScript only supports variants, so there is no need to support explicit typecasting.
Make sure you just use 'Next' instead of 'Next i'... VBScript does not need to keep track of the control variable (though my preference would be for it to just ignore such a statement, so that VB and VBScript would be that much more syntactically consistent).
Make sure you don't create a string like this:
| myString = ""stuff" |
This will cause the error as well, since there are too many quotes.
Make sure you don't mix JavaScript syntax into a VBScript page, e.g.:
| <script language=vbscript runat=server> var x = "1" </script> |
(In newer versions of ASP, this actually produces a '0x800A000D Type Mismatch' error.)
Basically, look at the line of code the ASP error points to, and try to figure out if there's any syntax on that line that you copied from another environment (e.g. VB), from another machine with possibly a newer version of ASP, or from memory. Chances are, you copied or wrote code that won't work in your environment, or has a syntax error of some kind.
Share this:
More about:
- WhiteSmoke English Writing Software
- Life without model
- Creating Custom Error Pages with .htaccess
- Sprint could be barred from government contracts
- How can I give them a better 404 message?
- Personal Credit Report
- Customers Say the Electronic Medical Record is the Safer Choice
- Reasons why you should have a Weblogger installed on your web site.
- Credit Report and Credit Score





