Print Page | Close Window

Whats wrong with this?(pulling info from

Printed From: Web Wiz Forums
Category: General Discussion
Forum Name: Classic ASP Discussion
Forum Description: Discussion on Active Server Pages (Classic ASP).
URL: https://forums.webwiz.net/forum_posts.asp?TID=14240
Printed Date: 30 March 2026 at 10:06am
Software Version: Web Wiz Forums 12.08 - https://www.webwizforums.com


Topic: Whats wrong with this?(pulling info from
Posted By: elbeardo
Subject: Whats wrong with this?(pulling info from
Date Posted: 14 March 2005 at 5:02pm
Hi there,
I'm trying to get this asp file to retrieve info from my database. Im using urlencode so that i can pass the data to a dynamic flash form which i have already set up. the table im collecting the data from is called book, and thedb is called project.
<%
    Set Conn = Server.CreateObject("ADODB.Connection")
    Conn.Open "Driver=Microsoft Access Driver (*.mdb);DBQ=" &
Server.MapPath("Project.mdb")

    Set query = Server.CreateObject("ADODB.Command")
    Set stBooks = Server.CreateObject("ADODB.Recordset")

    query.CommandText = "Select * From book"
    query.CommandType = 1
    Set query.ActiveConnection = Conn

    stBooks.Open query, , 1, 3

    stBooks.Move CLng(Request("Record"))

    Response.write "bookNumber=" & Server.URLEncode(stBooks("bookNumber")) & "&"
    Response.write "bookTitle=" & Server.URLEncode(stBooks("bookTitle")) & "&"
    Response.write "author=" & Server.URLEncode(stBooks("author")) & "&"
    Response.write "ISBN=" & Server.URLEncode(stBooks("ISBN")) & "&"
    Response.write "type=" & Server.URLEncode(stBooks("type")) & "&"
    Response.write "genre=" & Server.URLEncode(stBooks("genre")) & "&"
    Response.write "yearPublished=" & Server.URLEncode(stBooks("yearPublished")) & "&"
    Response.write "noOfPages=" & Server.URLEncode(stBooks("noOfPages")) & "&"
    Response.write "bookLocation=" & Server.URLEncode(stBooks("bookLocation")) & "&"


    Response.write "TotalRecords=" & stBooks.RecordCount

    stBooks.Close
    Conn.Close
%>

When i run it locally the browser just says "waiting for local host..." in the status bar. I'm not exactly sure if its my asp thats wrong or my action script but i suspect its the asp thats why i am posting it here. Btw i've done it like this so that each new record from the db can be displayed separately when the user presses the button on the flash form (thats what is supposed to happen anyway ;( )

Thanks,
rob


-------------
dude



Replies:
Posted By: elbeardo
Date Posted: 16 March 2005 at 1:10pm
Ok i found out soon after posting that the connection settings were wrong but ive sortd that now.... still having probs getting it to work though...
Any help at all would still be greatly appreciated thanks,
rob


-------------
dude



Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.08 - https://www.webwizforums.com
Copyright ©2001-2026 Web Wiz Ltd. - https://www.webwiz.net