strange errormessage ('END expected') 
Author Message
 strange errormessage ('END expected')

I get this errmsg:

"Kompilierungsfehler in Microsoft VBScript-Fehler '800a03f6'

'End' erwartet

/spiel_all_versuch.asp, Zeile 90"

But I really don't know why, i suppose it has something to do with a SELECT
CASE statement I'm using, but I actually think I'm using the right syntax...

CAn anybody explain this to me??

My Code:

<%
TeamID=request.querystring("teamid")
%>
<!-- #include file="include/OpenSpielbetriebDB.inc" -->
<%
'Which data shall be shown (goals, cards, ...)
SQL="SELECT stats_tore, stats_karten FROM teams WHERE TeamID=" & TeamID
'response.write(SQL)
Set RS_Config=objConn.Execute(SQL)

sAction=1

IF RS_Config("stats_tore")=FALSE AND RS_Config("stats_karten")=FALSE THEN
 sAction=0
ELSEIF RS_Config("stats_tore")=TRUE AND RS_Config("stats_karten")=FALSE THEN
 sAction=1
ELSEIF RS_Config("stats_tore")=FALSE AND RS_Config("stats_karten")=TRUE THEN
 sAction=2
ELSE
 sAction=3
END IF

sSelect="SELECT t.des, s.name, s.vorname, s.gebdatum, s.email"
sFrom="FROM Teams t, Spieler s"
sWhere="WHERE t.TeamID=" & TeamID & " AND t.teamID=s.teamID AND s.show=TRUE
ORDER BY s.name"
sTableHeader="<td>&nbsp;</td><td>Name</td><td>Geburtstag</td><td>Email</td>"

SELECT CASE sAction
  CASE 0
    sTabInhalt="<td>&nbsp;</td>"
  CASE 1
    sSelect=sSelect & ", s.tore"
    sTableHeader=sTableHeader & "<td>Tore</td>"
    'sTabInhalt="<td><%=sTore%></td>"
  CASE 2
    sSelect=sSelect & ", s.karten_gelb, s.karten_rot, s.karten_gelbrot"
    sTableHeader=sTableHeader & "<td>GK</td><td>GRK</td><td>RK</td>"
    sTabInhalt="<td><%=sGK%></td><td><%=sGRK%></td><td><%=sRK%></td>"
  CASE 3
    sSelect=sSelect & ", s.karten_gelb, s.karten_rot, s.karten_gelbrot,
s.tore"
    sTableHeader=sTableHeader &
"<td>Tore</td><td>GK</td><td>GRK</td><td>RK</td>"
    sTabInhalt="<td><%=sTore%></td><td><%=sGK%></td>"
    sTabInhalt=sTabInhalt & "<td><%=sGRK%></td><td><%=sRK%></td>"
END SELECT

SQL=sSelect & sFrom & sWhere
sTableHeader=sTableHeader & "<td>&nbsp;</td>"

response.write(SQL)
Set RS=objConn.Execute(SQL)

%>
<html>
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style type="text/css">
<!--
.schrift {  font-family: Arial, Helvetica, sans-serif; font-size: 12px}
.Titelzeile {  font-family: Arial, Helvetica, sans-serif; font-size: 16px;
font-weight: bold; color: #FF9900;

background-color: #FFFFCC}
.tabelleninhalt {  font-family: Arial, Helvetica, sans-serif; font-size:
14px; color: #000000; background-color: #FFCC66}
.seitentitel {  font-family: Arial, Helvetica, sans-serif; font-size: 20px;
color: #FF9933}
-->
</style>
</head>

<body bgcolor="#FFFFFF" text="#000000">
<p align="center"><font face="Arial, Helvetica, sans-serif" size="4"
color="#FF9900"

class="seitentitel">Kader&nbsp;<%=RS("des")%>&nbsp;2001/2002</font><font
face="Arial, Helvetica, sans-serif" size="4">
  </font><br>
</p>
<table width="100%" border="0" class="tabelleninhalt">
  <tr class="Titelzeile">
<%Response.Write(sTableHeader)%>
  </tr>
<%While not RS.EOF%>
  <tr>
<%
sTore=RS("Tore")
sGK=RS("Karten_gelb")
sRK=RS("Karten_rot")
sGRK=RS("Karten_gelbrot")
%>
    <td>&nbsp;</td>
    <td><%Response.Write(RS("name") & " " & RS("vorname"))%></td>
    <td><%Response.Write(RS("GebDatum"))%></td>
    <td>
    <%IF RS("email") <> "" THEN%>
     <a href='mailto:<%=RS("email")%>'><img
src=" http://www.*-*-*.com/ ; width="46" height="18"

border="0"></a>
     <%END IF%>
    </td>
<%Response.Write(sTabInhalt)%>
    <td>&nbsp;</td>
  </tr>
<%
RS.MoveNext
WEND
%>
</table>
</body>
</html>



Fri, 13 Feb 2004 20:04:08 GMT  
 strange errormessage ('END expected')
??? what is on line 90 (referred to in the error message)...

--
Michael Harris
Microsoft.MVP.Scripting
--

Please do not email questions - post them to the newsgroup instead.
--

Quote:

> I get this errmsg:

> "Kompilierungsfehler in Microsoft VBScript-Fehler '800a03f6'

> 'End' erwartet

> /spiel_all_versuch.asp, Zeile 90"

> But I really don't know why, i suppose it has something to do with a SELECT
> CASE statement I'm using, but I actually think I'm using the right syntax...

> CAn anybody explain this to me??

> My Code:

> <%
> TeamID=request.querystring("teamid")
> %>
> <!-- #include file="include/OpenSpielbetriebDB.inc" -->
> <%
> 'Which data shall be shown (goals, cards, ...)
> SQL="SELECT stats_tore, stats_karten FROM teams WHERE TeamID=" & TeamID
> 'response.write(SQL)
> Set RS_Config=objConn.Execute(SQL)

> sAction=1

> IF RS_Config("stats_tore")=FALSE AND RS_Config("stats_karten")=FALSE THEN
>  sAction=0
> ELSEIF RS_Config("stats_tore")=TRUE AND RS_Config("stats_karten")=FALSE THEN
>  sAction=1
> ELSEIF RS_Config("stats_tore")=FALSE AND RS_Config("stats_karten")=TRUE THEN
>  sAction=2
> ELSE
>  sAction=3
> END IF

> sSelect="SELECT t.des, s.name, s.vorname, s.gebdatum, s.email"
> sFrom="FROM Teams t, Spieler s"
> sWhere="WHERE t.TeamID=" & TeamID & " AND t.teamID=s.teamID AND s.show=TRUE
> ORDER BY s.name"
> sTableHeader="<td>&nbsp;</td><td>Name</td><td>Geburtstag</td><td>Email</td>"

> SELECT CASE sAction
>   CASE 0
>     sTabInhalt="<td>&nbsp;</td>"
>   CASE 1
>     sSelect=sSelect & ", s.tore"
>     sTableHeader=sTableHeader & "<td>Tore</td>"
>     'sTabInhalt="<td><%=sTore%></td>"
>   CASE 2
>     sSelect=sSelect & ", s.karten_gelb, s.karten_rot, s.karten_gelbrot"
>     sTableHeader=sTableHeader & "<td>GK</td><td>GRK</td><td>RK</td>"
>     sTabInhalt="<td><%=sGK%></td><td><%=sGRK%></td><td><%=sRK%></td>"
>   CASE 3
>     sSelect=sSelect & ", s.karten_gelb, s.karten_rot, s.karten_gelbrot,
> s.tore"
>     sTableHeader=sTableHeader &
> "<td>Tore</td><td>GK</td><td>GRK</td><td>RK</td>"
>     sTabInhalt="<td><%=sTore%></td><td><%=sGK%></td>"
>     sTabInhalt=sTabInhalt & "<td><%=sGRK%></td><td><%=sRK%></td>"
> END SELECT

> SQL=sSelect & sFrom & sWhere
> sTableHeader=sTableHeader & "<td>&nbsp;</td>"

> response.write(SQL)
> Set RS=objConn.Execute(SQL)

> %>
> <html>
> <head>
> <title>Untitled Document</title>
> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
> <style type="text/css">
> <!--
> .schrift {  font-family: Arial, Helvetica, sans-serif; font-size: 12px}
> .Titelzeile {  font-family: Arial, Helvetica, sans-serif; font-size: 16px;
> font-weight: bold; color: #FF9900;

> background-color: #FFFFCC}
> .tabelleninhalt {  font-family: Arial, Helvetica, sans-serif; font-size:
> 14px; color: #000000; background-color: #FFCC66}
> .seitentitel {  font-family: Arial, Helvetica, sans-serif; font-size: 20px;
> color: #FF9933}
> -->
> </style>
> </head>

> <body bgcolor="#FFFFFF" text="#000000">
> <p align="center"><font face="Arial, Helvetica, sans-serif" size="4"
> color="#FF9900"

> class="seitentitel">Kader&nbsp;<%=RS("des")%>&nbsp;2001/2002</font><font
> face="Arial, Helvetica, sans-serif" size="4">
>   </font><br>
> </p>
> <table width="100%" border="0" class="tabelleninhalt">
>   <tr class="Titelzeile">
> <%Response.Write(sTableHeader)%>
>   </tr>
> <%While not RS.EOF%>
>   <tr>
> <%
> sTore=RS("Tore")
> sGK=RS("Karten_gelb")
> sRK=RS("Karten_rot")
> sGRK=RS("Karten_gelbrot")
> %>
>     <td>&nbsp;</td>
>     <td><%Response.Write(RS("name") & " " & RS("vorname"))%></td>
>     <td><%Response.Write(RS("GebDatum"))%></td>
>     <td>
>     <%IF RS("email") <> "" THEN%>
>      <a href='mailto:<%=RS("email")%>'><img
> src="http://www.fc-phoenix.ch/gbook/email.gif" width="46" height="18"

> border="0"></a>
>      <%END IF%>
>     </td>
> <%Response.Write(sTabInhalt)%>
>     <td>&nbsp;</td>
>   </tr>
> <%
> RS.MoveNext
> WEND
> %>
> </table>
> </body>
> </html>



Sat, 14 Feb 2004 03:40:50 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. Strange "Expected '('" Error

2. Expected end of statement - what's wrong?

3. Simplest of programs gives error ';' expected

4. Expected ')'

5. 'Expected Literal Constant' for Public Const

6. error message: Expected 'Sub'

7. class doesn't support automation or doesn't support expected interface

8. help with strange '==' behaviour

9. mde's and F-end/B-end

10. End doesn't end

11. END Statement doesn't end program!

12. Strange '~' Error

 

 
Powered by phpBB® Forum Software