Welcome Guest ( Log In | Register)



 
Reply to this topicStart new topic
> Asp Help, need help
alexia
post Jul 4 2005, 05:08 AM
Post #1


Super Member
*********

Group: Members
Posts: 310
Joined: 9-February 05
From: Italian
Member No.: 3,677



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

CODE
<% @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 saved
strProvider = "Driver={Microsoft Access Driver (*.mdb)};
DBQ=\\Ei-kirk\data\ROADS\Databases\TRO.mdb;"

'Creates an instance of an Active Server component
set objConn = server.createobject("ADODB.Connection")

'Opens the connection to the data store
objConn.Open strProvider

'Instantiate Command object and use ActiveConnection property to
'attach connection to Command object
set cm = Server.CreateObject("ADODB.Command")
cm.ActiveConnection = objConn

'filter ID

strID

'Define SQL query
cm.CommandText ="SELECT * FROM TRO WHERE ID = '?' TOP 1"

'Define query parameter configuration information for guestbook fields
set objparam=cm.createparameter(, 200, , 255, strID)
cm.parameters.append objparam
cm.execute

title=
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%">&nbsp;</td>
</tr>
<td colspan = "2" width="100%" bgcolor="#800080">
<p align="center">&nbsp;</p>
</td>
</table>
Go to the top of the page
 
+Quote Post

Reply to this topicStart new topic

 



- Lo-Fi Version Time is now: 7th October 2008 - 01:46 AM