Darren, the problem is only occuring when I have an uneven no. of rows in the db - the ASP is choking when there isn't the correct number of entries in the DB to fill out the HTML row evenly & fully. Any idea on what do I need to do to fix this?
The proper URL: www.liammullins.com/res.asp thanks again jac. The (Your) Code I'm using: <% dim objConn,sSQL, objRS Set objConn = Server.CreateObject("ADODB.Connection") objConn.ConnectionString = "DSN=liam" ' note, using select * is bad, bad, bad! :> ' see: http://www.adopenstatic.com/faq/selectstarisbad.asp for more ' details sSQL= "SELECT pic, address, town, county, desc, price FROM residential" objConn.Open Set objRS=objConn.Execute(sSQL) %> <!-- should really check to see if we have any records before starting to create the table --> <table border="0" cellspacing="1" cellpadding="2" width="98%" align="center"> <% do until objRS.EOF Response.Write "<tr align=""center"">" ' this is the left-hand column %> <td valign="top" class="prop" width="10%" align="left"> <img src="prop/<%=objRS("pic")%>" width="180" alt="Liam Mullins Auctioneers"/> </td> <td valign="top" class="prop" align="left" width="40%"> <b><%=objRS("address")%></b><br /> <b><%=objRS("town")%></b><br /> <b><%=objRS("county")%></b><br><br /> <b>Description:</b> <%=objRS("desc")%><br /> <b>Price Guide:</b> € <%=objRS("price")%> <br /> </td> <% ' now do the right hand column ' the movenext could put us beyond the end of the recordset if we have ' an odd number of records... objRS.Movenext() if objRS.EOF then ' no record, so finish the table off cleanly %> <td valign="top" class="prop" width="10%" align="left"> </td> <td valign="top" class="prop" align="left" width="40%"> </td> <% else ' grab all the details %> <td valign="top" class="prop" width="10%" align="left"> <img src="prop/<%=objRS("pic")%>" width="180" alt="Liam Mullins Auctioneers"/> </td> <td valign="top" class="prop" align="left" width="40%"> <b><%=objRS("address")%></b><br /> <b><%=objRS("town")%></b><br /> <b><%=objRS("county")%></b><br><br /> <b>Description:</b> <%=objRS("desc")%><br /> <b>Price Guide:</b> € <%=objRS("price")%> <br /> </td> <% end if ' if objRS.EOF then ' close the row Response.Write "</tr>" ' move to the next record objRS.MoveNext() loop ' do until objRS.EOF Response.Write "</table>" objRS.close objConn.close Set objRS=nothing Set objConn=nothing %> </table> ____ • The WDVL Discussion List from WDVL.COM • ____ To Join wdvltalk, Send An Email To: mailto:[EMAIL PROTECTED] Send Your Posts To: [EMAIL PROTECTED] To change subscription settings to the wdvltalk digest version: http://wdvl.internet.com/WDVL/Forum/#sub ________________ http://www.wdvl.com _______________________ You are currently subscribed to wdvltalk as: [EMAIL PROTECTED] To unsubscribe send a blank email to [EMAIL PROTECTED]