Web Wiz - Green Windows Web Hosting

  New Posts New Posts RSS Feed - Whats wrong with this?(pulling info from
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Whats wrong with this?(pulling info from

 Post Reply Post Reply
Author
elbeardo View Drop Down
Newbie
Newbie


Joined: 21 February 2005
Location: United Kingdom
Status: Offline
Points: 21
Post Options Post Options   Thanks (0) Thanks(0)   Quote elbeardo Quote  Post ReplyReply Direct Link To This Post Topic: Whats wrong with this?(pulling info from
    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


Edited by elbeardo - 14 March 2005 at 5:31pm
Back to Top
elbeardo View Drop Down
Newbie
Newbie


Joined: 21 February 2005
Location: United Kingdom
Status: Offline
Points: 21
Post Options Post Options   Thanks (0) Thanks(0)   Quote elbeardo Quote  Post ReplyReply Direct Link To This Post 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
Back to Top
 Post Reply Post Reply

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.08
Copyright ©2001-2026 Web Wiz Ltd.


Become a Fan on Facebook Follow us on X Connect with us on LinkedIn Web Wiz Blogs
About Web Wiz | Contact Web Wiz | Terms & Conditions | Cookies | Privacy Notice

Web Wiz is the trading name of Web Wiz Ltd. Company registration No. 05977755. Registered in England and Wales.
Registered office: Web Wiz Ltd, Unit 18, The Glenmore Centre, Fancy Road, Poole, Dorset, BH12 4FB, UK.

Prices exclude VAT at 20% unless otherwise stated. VAT No. GB988999105 - $, € prices shown as a guideline only.

Copyright ©2001-2026 Web Wiz Ltd. All rights reserved.