Wrox Programmer Forums
| Search | Today's Posts | Mark Forums Read
Classic ASP Basics For beginner programmers starting with "classic" ASP 3, pre-".NET." NOT for ASP.NET 1.0, 1.1, or 2.0
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Classic ASP Basics section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old December 11th, 2007, 08:12 PM
Registered User
 
Join Date: Aug 2005
Location: Plano, TX, USA.
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to loydcampbell Send a message via Yahoo to loydcampbell
Default Unterminated String Constant

I have a page in the web root of a client's site that loads properly. There are several included files, a database query, and display code. There is another page in a subfolder, dev2, that is almost identical except for renaming some of the recordset variables as we are upgrading from Access to SQL Server. For example, in the dev file we changed <%=rs("Tt.cID")%> to <%=rs("cID")%>. Except for 6 changes like that the two files are identical.

When we load the second file, however, it loads with page errors. The page looks fine, but in the status bar there is an error icon, and when clicked, shows 21 Unterminated String Constant errors. The last one is on line 1156. If I count all the lines in all the files, including the included files, I only find 766 total lines. The include files are in different folders but are identical.

I have two questions. The first is how can I find the error when the line number is so far off? The second question is how can IE find that many lines of code?

Any help would be greatly appreciated.

Have a great day!

Loyd Campbell
 
Old December 11th, 2007, 08:41 PM
Friend of Wrox
Points: 6,664, Level: 34
Points: 6,664, Level: 34 Points: 6,664, Level: 34 Points: 6,664, Level: 34
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jan 2004
Location: Sydney, NSW, Australia.
Posts: 1,870
Thanks: 12
Thanked 20 Times in 20 Posts
Send a message via AIM to mat41
Default

This sounds like a javascript error? IME ASP errors do not apear in the status bar

Where are you counting the lines? You should:
> view source in your browser
> select ALL the text
> paste it this text in a code editor, now look at the line numbers. Im sure it will become clear...

Wind is your friend
Matt
 
Old December 11th, 2007, 09:32 PM
Registered User
 
Join Date: Aug 2005
Location: Plano, TX, USA.
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to loydcampbell Send a message via Yahoo to loydcampbell
Default

Matt,

You are a winner. I was busy looking at the source code in my ASP file and didn't even think about the code that the server is actually sending to the client. I did find an unterminated string constant when I did as you suggested - view source, copy and paste into editor, then go to the line(s) with the error. I had a line break there for readability that should not have been there but it only occurred when one of the database records had a certain value, hence it only happened 21 times while the recordset contained 40,500 records.

Problem solved and I am very appreciative.

Thanks,


Have a great day!

Loyd Campbell
 
Old December 11th, 2007, 09:40 PM
Friend of Wrox
Points: 6,664, Level: 34
Points: 6,664, Level: 34 Points: 6,664, Level: 34 Points: 6,664, Level: 34
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jan 2004
Location: Sydney, NSW, Australia.
Posts: 1,870
Thanks: 12
Thanked 20 Times in 20 Posts
Send a message via AIM to mat41
Default

You are welcome...

Wind is your friend
Matt




Similar Threads
Thread Thread Starter Forum Replies Last Post
Unterminated string constant cnottingham Classic ASP Databases 8 October 28th, 2011 01:43 PM
Unterminated String Constant Apocolypse2005 Javascript 2 June 22nd, 2006 08:36 AM
unterminated string constant Stubby HTML Code Clinic 1 February 3rd, 2005 05:56 AM
Unterminated String Constant Ben Horne Javascript 7 October 21st, 2004 11:26 AM
Unterminated String Constant Ben Horne Javascript 2 April 9th, 2004 02:26 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.