I need to display records Horizontally, I do not know for some reason this
code gives me an error, uses an access db.
Microsoft VBScript compilation (0x800A040E)> Error type:
'loop' without 'do'
/aspcodes/DisplayROwsHori zon/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>Hotizont al Records Display.</title>
<!--#include file="conn.asp"-->
<body>
<%
DIM mySQL, objRS
mySQL = "SELECT * FROM tblData"
Set objRS = Server.CreateOb ject("ADODB.Rec ordset")
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>"&objR S("Item")&"</td>"
ELSE
Response.Write "<td>"&objRS("I tem")&"</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.CreateOb ject("ADODB.Con nection")
objRS.Open ("Provider=Micr osoft.Jet.OLEDB .4.0; Data Source="& Server.MapPath
("/aspcodes/DisplayROwsHori zon/DisRowHorizon.m db"))
Your Help in this regard will be Highly appreciated.
Thank you.
--
Message posted via WebmasterKB.com
http://www.webmasterkb.com/Uwe/Forums.aspx/asp/200808/1