468,544 Members | 1,716 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 468,544 developers. It's quick & easy.

how do display top 10 new release songs?

Hi!

My backend is MS-Access. I want to display the resent new releases song.
i got in error in query. i tryed in two way, but i didn't got the answer. pls help me........

1. "Select Title,singer,Release_date from tbl_Item_Master where datediff(month,Release_date,now())<=1 order by Release_date;"

2. "Select Title,singer,Release_date from tbl_Item_Master where datediff(month,Release_date,getDate())<=1 order by Release_date;"

error - getDate()

Expand|Select|Wrap|Line Numbers
  1. <%pathdefiner = "../"%>
  2. <!--#include file="../Connection/connector.asp" -->
  3.  
  4. <html>
  5.  
  6. <head>
  7. <meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
  8. <meta name="GENERATOR" content="Microsoft FrontPage 4.0">
  9. <meta name="ProgId" content="FrontPage.Editor.Document">
  10. <title>Song</title>
  11. </head>
  12.  
  13. <body>
  14.  
  15. <form method="POST" action="--WEBBOT-SELF--">
  16. <!--webbot bot="SaveResults"
  17. U-File="C:\Inetpub\wwwroot\AspDemo\home\_private\for m_results.txt"
  18. S-Format="TEXT/CSV" S-Label-Fields="TRUE" -->
  19. <table border="1" width="100%">
  20. <tr>
  21. <td width="100%">
  22. <h2>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbs p;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<font color="#0000FF" face="Monotype Corsiva" size="5">
  23. New Releases in the Last Month&nbsp;</font></h2>
  24. </td>
  25. </tr>
  26. <% 
  27. Set rs = Server.CreateObject("ADODB.Recordset")
  28. Set rs.ActiveConnection = my_Conn
  29.  
  30. retrieveSql = "Select Title,singer,Release_date from tbl_Item_Master where datediff(month,Release_date,now())<=1 order by Release_date;"
  31.  
  32. rs.Source = retrieveSql
  33. rs.Open
  34.  
  35. Do While not rs.EOF %>
  36. <tr>
  37. <td width="12%"><% = rs("Item_code") %></td>
  38. <td width="88%"><% = rs("Title") %></td>
  39. </tr>
  40. <%rs.MoveNext 
  41.  
  42. Loop
  43. rs.Close
  44. my_Conn.Close
  45. set rs=nothing
  46. set my_Conn=nothing
  47. %>
  48.  
  49. </table>
  50. <p>&nbsp;</p>
  51. <p>&nbsp;</p>
  52. </form>
  53.  
  54. </body>
  55.  
  56. </html> 
  57.  
Mar 4 '10 #1
1 1316
jhardman
3,405 Expert 2GB
Haven't I warned you before about posting db questions in the ASP forum? Your issue is in Access, Access is returning an error, go post in the Access forum!

Jared
Mar 11 '10 #2

Post your reply

Sign in to post your reply or Sign up for a free account.

Similar topics

4 posts views Thread by Sumaira Ahmad | last post: by
4 posts views Thread by andy6 via DotNetMonster.com | last post: by
reply views Thread by NPC403 | last post: by
1 post views Thread by UniDue | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.