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 Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Expected end of statement error

Status
Not open for further replies.

TheConeHead

Programmer
Aug 14, 2002
2,106
US
I get this error on the line that says:

Dim Fname As String

what's up?
 
Maybe post some of the surrounding lines. Seems like a previous line may be causing the compiler some confusion.
 
Does it matter? if it does I am typing it at the very start of the page:
<%
Dim Fname As String


.......

%>
 
and if I do:

<script language=&quot;VBScript&quot;>
Dim Fname As String


.......

</script>

I get the same error
 
Whoops. VBScript. Don't know much about that. You might try the VBScript forum.
 
wow! really??? what is the difference between the two?
 
VBScript does not support data types other than variant.
You should try the following.

<%
Dim Fname
.......
%>

-OR-

<script language=&quot;VBScript&quot;>
Dim Fname
.......
</script>
 
Get rid of the &quot;as string&quot;

In VBScript (at least as it pertains to ASP) you don't declare the function type.

Essentially, it thinks you are trying to do something other than dim on that line.

At least, that's what I've always done with ASP....

 
Well OK, the language is nearly identical but, for me, its the implementation that is so unfamiliar. I don't do any web development. I have no familiarity with common (or uncommon) errors and pitfalls when embedding script into web pages.
I'm sure a great many of the VB folks in this forum are not as in-the-dark as I am but it still seems you'd be better off in the VBScrip forum.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top