Jump to content
xisto Community
Sign in to follow this  
alexia

Asp Help need help

Recommended Posts

Hi,

Can someone please have a go at fixing this asp page for me. I am new asp, just know php. Would be really helpful

Access Table

ID - autonumber
type - text(50)
title - text(50)
date - date
Description - text(255)
Notes - memo

My asp page

<% @Language=VBScript %><html dir=ltr><head><title>Traffic Regulation Orders</title></head><body bgcolor="#FFFFFF" text="#000000"><%'Connects to the Access driver and Access database in the Inetpub'directory where the database is savedstrProvider = "Driver={Microsoft Access Driver (*.mdb)};DBQ=\\Ei-kirk\data\ROADS\Databases\TRO.mdb;"'Creates an instance of an Active Server componentset objConn = server.createobject("ADODB.Connection")'Opens the connection to the data storeobjConn.Open strProvider'Instantiate Command object and use ActiveConnection property to'attach connection to Command objectset cm = Server.CreateObject("ADODB.Command")cm.ActiveConnection = objConn'filter IDstrID'Define SQL querycm.CommandText ="SELECT * FROM TRO WHERE ID = '?' TOP 1"'Define query parameter configuration information for guestbook fieldsset objparam=cm.createparameter(, 200, , 255, strID)cm.parameters.append objparamcm.executetitle=date=type=description=note=%><table border="0" width="100%"><tr><td colspan = "2" width="100%" bgcolor="#008000"><p align="center"><font size="7"><b>Traffic Regulation Orders</b></font></p></td></tr><tr><td width="70%"><table border="0" width="100%"><tr><td width="15%">Title</td><td width="85%"><%=title%></td></tr><tr><td width="15%">Order Date</td><td width="85%"><%=date%></td></tr><tr><td width="15%">Type</td><td width="85%"><%=type%></td></tr><tr><td width="15%">Description</td><td width="85%"><%description%></td></tr><tr><td colspan="2" width="100%">Notes</td></tr><tr><td colspan="2" width="100%"><%notes%></td></tr></table></td><td width="30%"> </td></tr><td colspan = "2" width="100%" bgcolor="#800080"><p align="center"> </p></td></table>

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×
×
  • Create New...

Important Information

Terms of Use | Privacy Policy | Guidelines | We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.