Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Syntax error somehow...

Status
Not open for further replies.

Ma3x323

Programmer
Jun 27, 2001
148
US
New to ASP here. Been used to programming in C++ so I try to make everything usable. OK, here is the problem:
I am creating a search page (search1.asp)
FORMAT of page:
<!-- include files for globals -->
html tags
body
<!-- include a file that contains the search table (consists of combo boxes and submit buttons) -->
footer
<!-- include file to destroy connections -->

Once submit is pressed on any of the buttons, it goes to a complete asp page (search2.asp). No html tags at all. This page is basically responsible for creating the proper queries. Then it redirects to a page with the results and another set of searches (something we call a FILTER filter.asp)

Well, that said, my problem lies in search2.asp. When I post to it, it gives a syntax error. Considering this asp file starts with
<%@ Language=VBScript %>
<!-- include file="globals.inc" -->

<%
Dim count 'As Integer

blah blah blah code
%>

THERE IS NO SYNTAX ERROR ON THIS PAGE! I checked it all! But somehow the error says
Syntax error
Dim count 'As Integer
-^

I programmed in Visual Studio before with C++ and sometimes I get bogus errors from it and all I do is copy everything from that page, delete it, create a new one, name it the same and paste the stuff. Then the error disappears. Tried that but didnt work. I am out of options. Is there something I am missing here?

Thank you for the help in advance

-Feryl
--> Just a silly software engineer wannabee.
If you feel a post has been helpful to you, click on the link at the bottom of their post to cast a vote for &quot;TipMaster Of The Week&quot;. You don't need to be the one who asked the question to vote.
 
Without seeing the actual code, here's my list of potential culprits, all of which are almost undoubtedly wrong, but without seeing every line of code (including the include), that's the best I can do:

1. Somehow you've got an opening ASP tag (<%) in your include without a closing one (%>), resulting in two in a row, with the line number basically one off.

2. Your message doesn't really say that it's the Dim line, but rather that it's line x, which is actually inside the include. Can't remember if ASP counts lines in the include in the total and current line numbers.

3. You've typed some kind of invisible character without realizing it. Try deleting the line and the blank lines around it, and re-typing it. This is something that the copy-and-paste wouldn't effect.

4. You are cursed, perhaps from when you opened that ancient Egyptian tomb on summer vacation.

Sorry I've got nothing solid. If it keeps up, paste some more code (including the include).
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top