Hej! Jag får felmedelandet 'loop' without 'do' när jag har skrivit som nedan. Varför? Finns det nått annat som ser knasigt ut tycker ni! Mycket tacksam för svar! <!--#Include File="adovbs.inc" -->Varför får jag felmedelandet 'loop' without 'do'
<!--#Include File="adovbs.inc" -->
<HTML>
<% Marke = Request.QueryString("ID") %>
<% Set DB = Server.CreateObject("ADODB.Connection")
DB.open("Driver={Microsoft Access Driver (*.mdb)}; DBQ="& server.mappath ("webbshopp.mdb") &";")
Set RecSet = Server.CreateObject("ADODB.Recordset")
Visa = "SELECT * FROM kat"
RecSet.Open Visa, DB, adOpenForwardOnly, adLockReadOnly %>
<% Do Until RecSet.EOF %>
<% =RecSet("Marke") %>
<% If Request.QueryString("Marke") = RecSet("ID") Then %>
<%
Set DBb = Server.CreateObject("ADODB.Connection")
DBb.open("Driver={Microsoft Access Driver (*.mdb)}; DBQ="& server.mappath ("webbshopp.mdb") &";")
Set RS = Server.CreateObject("ADODB.Recordset")
Visa = "SELECT * FROM katund WHERE ID = '" & Marke & "' ORDER BY Besk"
RS.Open Visa, DBb, adOpenForwardOnly, adLockReadOnly %>
<% Do Until RS.EOF %>
<% =RS("Marke") %>
<% RS.MoveNext %>
<% Loop %>
<% RS.Close %> <% DBb.Close %>
<% Else %>
<% RecSet.MoveNext %>
<% Loop %>
<% RecSet.Close %>
<% Db.Close %>
</HTML>
<% End if %>Sv: Varför får jag felmedelandet ''''loop'''' without ''''do''''
<HTML>
<% Marke = Request.QueryString("ID") %>
<% Set DB = Server.CreateObject("ADODB.Connection")
DB.open("Driver={Microsoft Access Driver (*.mdb)}; DBQ="& server.mappath ("webbshopp.mdb") &";")
Set RecSet = Server.CreateObject("ADODB.Recordset")
Visa = "SELECT * FROM kat"
RecSet.Open Visa, DB, adOpenForwardOnly, adLockReadOnly %>
<% Do Until RecSet.EOF %>
<% =RecSet("Marke") %>
<% If Request.QueryString("Marke") = RecSet("ID") Then %>
<%
Set DBb = Server.CreateObject("ADODB.Connection")
DBb.open("Driver={Microsoft Access Driver (*.mdb)}; DBQ="& server.mappath ("webbshopp.mdb") &";")
Set RS = Server.CreateObject("ADODB.Recordset")
Visa = "SELECT * FROM katund WHERE ID = '" & Marke & "' ORDER BY Besk"
RS.Open Visa, DBb, adOpenForwardOnly, adLockReadOnly %>
<% Do Until RS.EOF %>
<% =RS("Marke") %>
<% RS.MoveNext %>
<% Loop %>
<% RS.Close %> <% DBb.Close %>
<% Else %>
<% RecSet.MoveNext %>
<b><% End if %></b>
<% Loop %>
<% RecSet.Close %>
<% Db.Close %>
</HTML>
Jag flyttade:
<% End if %>
så att det ligger under
<% RecSet.MoveNext %>