how to retrive one data at a time in asp ?

Discussion in 'C#' started by mynameishhs, Dec 10, 2010.

  1. #1
    i need a help.

    i want the below code to retrive the data from the database and display at the needed position ,
    and on clicking the title of the movie,
    there movie details should be retrived from the database and send to a webpage movie.asp.

    so can any body help me with the error in below code it shows error at ...rs.movenext
    loop ....................................((((errorr)))
    rs.close...

    any genius out there please help me.

    
    <%
    dim conn , rs , sql
    set conn = Server.CreateObject("ADODB.Connection")
    conn.provider="Microsoft.Jet.OLEDB.4.0"
    conn.open "Db\Db.mdb"
    
    set rs = Server.CreateObject("ADODB.recordset")
    sql = "Select ID , title , link from t1"
    rs.open sql , conn
    %>
    
    <%do until rs.eof 
    for  rs.Fields
    %>
    <a id = <%=rs.ID%> href = <%=rs.link%> > <%=rs.title%> </a> </br> </br>
    <% 
    next
    rs.movenext 
    loop
    rs.close
    conn.close
    %>
    
    Code (markup):
     
    mynameishhs, Dec 10, 2010 IP
  2. camjohnson95

    camjohnson95 Active Member

    Messages:
    737
    Likes Received:
    17
    Best Answers:
    0
    Trophy Points:
    60
    #2
    you should probably read a tutorial on asp and databases.... and html
     
    camjohnson95, Dec 10, 2010 IP