View Full Version : Form/html not working properly?

01-11-2008, 01:04 PM
Been using this as template for order tracking form. But it doesn't seem to work properly. Anyone know why?

Many thanks for the help

Kind regards,


<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Order Tracking</title>

' This script retrieves the ORDER TRACKING, given a customer
Dim yourID, rs
registration_CustomerID = 1
' Hey! This customerID can be retrieved from the Session object, once the customer is logged in!!

response.Write("Thank you for submitting your details <br>")
'path to the database

pathToDb = "e:\isproot\yr0708\BN3369\Group-14\registration.mdb"
response.write("The status of your orders are summarised in the below table - <br>")

'Open the database
set db= Server.CreateObject("ADODB.Connection")
dbId = "DRIVER={Microsoft Access Driver (*.mdb)};DBQ=" & pathToDb & ";UID=;PWD="
db.Open dbId

'All this boring stuff of the database you already know....
'And of the recordset as well.....
set rs = server.createObject("ADODB.Recordset")

'Define the query needed to find the required data: THIS IS THE BIT THAT MATTERS!
'I've concatenated the SQL statement, just to look nice in Notepad++
SQL = "SELECT UserAccount.Email, UserAccount.CustomerID, OrderTracking.OrderID, OrderTracking.BeginDate, OrderTracking.EndDate, OrderTracking.Operation "
SQL = SQL & "FROM UserAccount, tbl_Order, OrderTracking WHERE "
SQL = SQL & "UserAccount.CustomerID = " & registration_CustomerID & " AND UserAccount.CustomerID=tbl_Order.CustomerID AND "
SQL = SQL & "tbl_Order.OrderID = OrderTracking.OrderID"

'Fill the recordset with the data defined by the query:
rs.open SQL,db, 2, 2
response.Write("If any of the details below seem to be incorrect, please contact us as soon as possible<br>")
Response.Write ("<table border = " & chr(34) & "= " & "1" & chr(34) & ">")
Response.Write("<td> Order ID </td><td> Order Placed </td><td> Status </td>")
While Not RS.EOF
Response.Write("<td>" & rs("OrderID") & "</td><td>" & rs("BeginDate") & "</td><td>" & rs("Operation") & "</td>")
'Close the recordset and the database
response.Write("Closing recordset..")
response.Write("Closing database..")


01-11-2008, 06:29 PM
This isn't an HTML problem. You're using ASP to pull records from a database and something isn't working in the process.

To get better help you need to describe exactly what isn't working, what you expect to happen, etc. The more information you can provide, the better.

Moving to ASP…