943,901 Members | Top Members by Rank

Ad:
  • ASP Discussion Thread
  • Marked Solved
  • Views: 757
  • ASP RSS
Aug 14th, 2009
0

Record Duplicate ?

Expand Post »
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!
--------
asp Syntax (Toggle Plain Text)
  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.
Similar Threads
Reputation Points: 10
Solved Threads: 0
Newbie Poster
katec is offline Offline
2 posts
since Aug 2009
Aug 14th, 2009
0

Re: Record Duplicate ?

Nevermind I fixed it! thanks
Reputation Points: 10
Solved Threads: 0
Newbie Poster
katec is offline Offline
2 posts
since Aug 2009

This thread is solved

Either the thread starter or a moderator has marked this thread as solved. You can most likely trust the responses and answers given. There is most likely no reason for any further responses to be posted here. If you have a related question, please start a new thread in this forum instead.

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in ASP Forum Timeline: quick asp question
Next Thread in ASP Forum Timeline: Can I replace a line in a text file or start looping from a line in ASP





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC