Record Duplicate ?

Thread Solved

Join Date: Aug 2009
Posts: 2
Reputation: katec is an unknown quantity at this point 
Solved Threads: 0
katec katec is offline Offline
Newbie Poster

Record Duplicate ?

 
0
  #1
Aug 14th, 2009
Hi. This should be simple for the experienced. This code pulls the first record twice, but the rest are fine. I can't figure it out! Thanks for looking!
--------
  1. <%
  2. set conn=Server.CreateObject("ADODB.Connection")
  3. conn.Provider="Microsoft.Jet.OLEDB.4.0"
  4. conn.Open(Server.Mappath("products.mdb"))
  5. set rs = Server.CreateObject("ADODB.recordset")
  6.  
  7.  
  8.  
  9. sql="SELECT Model, Volts_Hz, BTUH, Max_Amps, Max_Temp, '<a href='+Drawing+'>'+Model+'</a>' AS Drawing FROM VAirConditioners ORDER BY BTUH ASC"
  10. rs.Open sql, conn
  11. %>
  12.  
  13.  
  14. <table id="header205" align="center">
  15. <tr>
  16. <%
  17.  
  18.  
  19. for each x in rs.Fields
  20. response.write("<th>" & x.name & "</th>")
  21. %>
  22. <td "nowrap="nowrap" class="tablesytle4"><%Response.Write(x.value)%></tr>
  23. <tr><%next %>
  24.  
  25.  
  26. <%do until rs.EOF%>
  27. </tr>
  28. <%
  29.  
  30. for each x in rs.Fields
  31. response.write("<th>" & x.name & "</th>") %>
  32. <td "nowrap="nowrap" class="tablesytle4"><%Response.Write(x.value)%>
  33. <tr>
  34. <%next
  35. rs.MoveNext%>
  36. </td> </tr>
  37.  
  38. <%loop
  39. rs.close
  40. conn.close
  41. %></table>
Last edited by peter_budo; Aug 14th, 2009 at 1:03 pm. Reason: Keep It Organized - For easy readability, always wrap programming code within posts in [code] (code blocks) and [icode] (inline code) tags.
Reply With Quote Quick reply to this message  
Join Date: Aug 2009
Posts: 2
Reputation: katec is an unknown quantity at this point 
Solved Threads: 0
katec katec is offline Offline
Newbie Poster

Re: Record Duplicate ?

 
0
  #2
Aug 14th, 2009
Nevermind I fixed it! thanks
Reply With Quote Quick reply to this message  
Reply

This thread has been marked solved.
Perhaps start a new thread instead?
Message:


Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC