Hotizontal Records Display in ASP.
- From: "iahamed via WebmasterKB.com" <u42620@uwe>
- Date: Sun, 10 Aug 2008 07:52:38 GMT
Hi all,
I need to display records Horizontally, I do not know for some reason this
code gives me an error, uses an access db.
Error type:
Microsoft VBScript compilation (0x800A040E)
'loop' without 'do'
/aspcodes/DisplayROwsHorizon/index.asp, line 26
Loop
I normally use the While Not objRS.EOF and close it with a Wend. Using what
ever way here it clashes with the If Statement Logic.
index.asp
</html>
<title>Hotizontal Records Display.</title>
<!--#include file="conn.asp"-->
<body>
<%
DIM mySQL, objRS
mySQL = "SELECT * FROM tblData"
Set objRS = Server.CreateObject("ADODB.Recordset")
objRS.Open mySQL, objConn
DIM recCount
IF Not objRS.EOF THEN
Response.Write "<table width='100%'>"
recCount = 0
Do UNTIL objRS.EOF
IF recCount Mod 3 = 0 THEN
IF recCount <> 0 THEN
Response.Write "</tr>"
Response.Write "<tr><td>"&objRS("Item")&"</td>"
ELSE
Response.Write "<td>"&objRS("Item")&"</td>"
END IF
recCount = recCount + 1
objRS.MoveNext
Loop
Response.Write"</tr></table>"
ELSE
Response.Write "Sorry, there are no records in our database."
END IF
%>
</body>
</html>
------------------------------------------------------------------------
Con.asp
'Dim objRS Name is in Index so cannot redefine
'Dim objRS
set objRS= Server.CreateObject("ADODB.Connection")
objRS.Open ("Provider=Microsoft.Jet.OLEDB.4.0; Data Source="& Server.MapPath
("/aspcodes/DisplayROwsHorizon/DisRowHorizon.mdb"))
Your Help in this regard will be Highly appreciated.
Thank you.
--
Message posted via WebmasterKB.com
http://www.webmasterkb.com/Uwe/Forums.aspx/asp-db/200808/1
.
- Follow-Ups:
- Re: Hotizontal Records Display in ASP.
- From: Evertjan.
- Re: Hotizontal Records Display in ASP.
- Prev by Date: domain de eu com domain registration kostenlose internet domain domain preis vergleich domain wert kostenlos
- Next by Date: Re: Hotizontal Records Display in ASP.
- Previous by thread: domain de eu com domain registration kostenlose internet domain domain preis vergleich domain wert kostenlos
- Next by thread: Re: Hotizontal Records Display in ASP.
- Index(es):
Loading