Hi i am trying to display all of the data stored for every record in my database which meets the criteria in the sql query. I have tested the query and it works fine, returning everything expected. However when trying to implement i into an asp document for web use, i keep getting the error page cannot be displayed.
Whats more confusing is i have pretty much exactly the same code only with the query and fields changed working absolutely fine, and the code below is just a replica of that !?
Code:dim fs,ts Dim objConnection Dim objRecordset Response.Write("DVDs with Branch_id and times rented:<br />") Set objConnection = Server.CreateObject("ADODB.Connection") With objConnection .ConnectionString = "Provider=MSDAORA.1;Password=*******;User ID=******;Data Source=*****;Persist Security Info=True" .Open sql="SELECT RENTAL_SUMMARY.DVD_ID,DVD_NAME,BRANCH_NAME,TIMES_RENTED FROM BRANCH1,DVD,RENTAL_SUMMARY WHERE BRANCH1.BRANCH_ID = DVD.DVD_ID AND DVD.DVD_ID=RENTAL_SUMMARY.DVD_ID ORDER BY BRANCH_NAME,TIMES_RENTED DESC" Set objRecordset = .Execute(sql) %> <table border="5" cellspacing="1" id="AutoNumber1" align="left" cellpadding="3" bordercolorlight="#808080"> <tr><td>BRANCH_ID</td><td>BRANCH_ADDRESS</td><td>TELNO</td><td>POSTCODE</td><td>BRANCH_NAME</td></tr> <% Do while (Not objRecordset.eof)%> <tr><td> <%=objRecordset.Fields("DVD_ID") %> </td> <td> <%= objRecordset.Fields("DVD_NAME") %> </td> <td> <%=objRecordset("BRANCH_NAME") %> </td> <td> <%=objRecordset.Fields("TIMES_RENTED") %> </td> </tr> <% objRecordset.MoveNext Loop End With%> </table>





Bookmarks