CFF KB - Carrz-Fox-Fire Promotions Knowledge Base
CFF KB is all about 1 thing: The Sharing of Knowledge and the Power we gain from it.Knowledge Base
- Breadrumbs:
Microsoft VBScript compilation (0x800A0409) Unterminated string constant - Response.Write
- Article ID:
68 - Date Created
Sunday, December 12, 2010 - Last Updated
Sunday, December 12, 2010 - This Article Has been Viewed
9258 times - Short Desc
Using the Response.write you have to make sure that you do not use any illegal characters within the string. If you do, you will get a #800A0409 Unterminated string constant. - Details
Writing a Response.Write you will sometimes mistakenly write out a typical asp code with the accompanying brackets, this is not allowed in a response.write.
As seen in the error below
Microsoft VBScript compilation (0x800A0409)
Unterminated string constant
/Inserts.asp, line 86, column 150
response.write"<table><tr><td style=""border:1px #000000 dotted; padding:5px;""><a href=""?Type=Profile&rhcid="&MUID&"""><img src=""http://<%=msiteurl
--------------------------------------------------------------------------------^ - Recreate Issue
To recreate this error.
<%
response.write"<table><tr><td><%=getValue%></td></tr></table>"
%>
The above example has the <%=%> which is illegal in a Response.Write. - Resolve Issue
When using a Variable within a Response.Write, you cannot use the <%= %> like is used in the example above. Instead, you will use a "&getValue&".
<%
response.write"<table><tr><td>"&getValue&"</td></tr></table>"
%>
As you can see in the example above, the proper way is to use the "& &" wrapped around our variable. This will add the value without the need of the typical asp brackets.
Share With Friends (Updated 6-8-2010)
Recent Articles
All Topics
- Coming Soon - Knowledge Exchange
Trending Articles
- Microsoft VBScript runtime error '800a0046' Permission denied FileSystemObject 24695
- Microsoft OLE DB Provider for SQL Server error '80040e57' String or binary data would be truncated. or The field is too small to accept the amount of data you attempted to add. Try inserting or pasting less data. 21297
- ADODB.Parameters error '800a0e7c' Parameter object is improperly defined 19544
- After Effects warning: Audio conforming failed for the following file .cfa. Perhaps due to disk space 17785
- The backup set holds a backup of a database other than the existing 16825