SitePoint Sponsor

User Tag List

Results 1 to 2 of 2
  1. #1
    SitePoint Enthusiast
    Join Date
    Dec 2005
    Posts
    57
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Simple form submission problem

    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") %>&nbsp;</td>
    <td> <%= objRecordset.Fields("DVD_NAME") %>&nbsp;</td> 
    <td> <%=objRecordset("BRANCH_NAME") %>&nbsp;</td> 
    <td> <%=objRecordset.Fields("TIMES_RENTED") %>&nbsp;</td> </tr> 
    <% objRecordset.MoveNext 
    Loop 
    End With%>
    </table>

  2. #2
    SitePoint Wizard
    Join Date
    Nov 2004
    Location
    Nelson BC
    Posts
    2,310
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    i keep getting the error page cannot be displayed
    That doesn't say much! could be anything.

    If you are using IE, go tools/internet options/advanced and UNCHECK "Show friendly HTTP error messags"


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •