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