HI,
I have the code listed below that creates a report showing all relevant records within a DB. I now have an issue where the user wants to be able to edit the contents of one of the fields/columns (mattnotes) - the changes are not be written back to the db, just to appear on the page ready for printing.
Any ideas if this is possible ?
Any help would be appreciated.
I have the code listed below that creates a report showing all relevant records within a DB. I now have an issue where the user wants to be able to edit the contents of one of the fields/columns (mattnotes) - the changes are not be written back to the db, just to appear on the page ready for printing.
Any ideas if this is possible ?
Code:
<%@LANGUAGE = VBScript %>
<% Option Explicit %>
<!-- #INCLUDE FILE="../Scripts/GetDatabase.asp"-->
<%
Dim RS, strSQL
'Open Database - DBConnect sub procedure in GetDatabase.asp
Call DBConnect("adtracking.mdb")
Set RS=Server.CreateObject("ADODB.Recordset")
strSQL = "SELECT * FROM bookingform WHERE issuedatetxt = '"& Request ("issuedate")&"' and joburgwam <>'' or issuedatetxt = '"& Request ("issuedate")&"' and joburgcd <>'' or issuedatetxt = '"& Request ("issuedate")&"' and joburgother<>'' ORDER BY adcode ASC;"
RS.Open strSQL, DB
Dim currentColor, colorType1, colorType2
colorType1 = "#BFCFFF"
colorType2 = "#9FBEFE"
currentColor = colorType1
%>
<html>
<head>
<title>AOL Time Warner</title>
</head>
<body bgcolor="#FFFFFF" text="#000000" link="#0000FF" vlink="#808080" alink="#FF0000" leftmargin=0 topmargin=0 marginheight="0" marginwidth="0">
<table width="500" border="0" cellspacing="0" cellpadding="0" align="center">
<tr>
<td bgcolor="#768ABE">
<table width="647" border="0" cellspacing="1" cellpadding="3" align="left" height="60">
<tr>
<td bgcolor="#FFFFFF" width="621" height="32" colspan="17" align="center"><b><font face="Arial" size="2">Material
Transmission Information - Joburg Plant</font></b></td>
</tr>
<tr>
<td bgcolor="#FFFFFF" width="40" height="32"><font face="Arial" size="2">Booking Ref</font></td>
<td bgcolor="#FFFFFF" width="40"><font face="Arial" size="2">Revision Number</font></td>
<td bgcolor="#FFFFFF" width="40" height="32"><font face="Arial" size="2">Ad Type</font></td>
<td bgcolor="#FFFFFF" width="40" height="32"><font face="Arial" size="2">Advertiser</font></td>
<td bgcolor="#FFFFFF" width="40" height="32"><font face="Arial" size="2">Edition</font></td>
<td bgcolor="#FFFFFF" width="40" height="32"><font face="Arial" size="2">Issue Date</font></td>
<td bgcolor="#FFFFFF" width="27" height="32"><font face="Arial" size="2">Unit Size</font></td>
<td bgcolor="#FFFFFF" width="27" height="32"><font face="Arial" size="2">Unit Info</font></td>
<td bgcolor="#FFFFFF" width="60" height="32"><font face="Arial" size="2">Colour</font></td>
<td bgcolor="#FFFFFF" width="49" height="32"><font face="Arial" size="2">Bleed</font></td>
<td bgcolor="#FFFFFF" width="49" height="32"><font face="Arial" size="2">Bleed Details</font></td>
<td bgcolor="#FFFFFF" width="49" height="32"><font face="Arial" size="2">Caption</font></td>
<td bgcolor="#FFFFFF" width="49" height="32"><font face="Arial" size="2">Material Type</font></td>
<td bgcolor="#FFFFFF" width="49" height="32"><font face="Arial" size="2">Material Notes</font></td>
<td bgcolor="#FFFFFF" width="49" height="32"><font face="Arial" size="2">Repeat Date</font></td>
<td bgcolor="#FFFFFF" width="49"><font face="Arial" size="2">Dup Request</font></td>
<td bgcolor="#FFFFFF" height="32"><font face="Arial" size="2">WamNet</font></td>
<td bgcolor="#FFFFFF" height="32"><font face="Arial" size="2">CD</font></td>
<td bgcolor="#FFFFFF" height="32"><font face="Arial" size="2">Other</font></td>
</tr>
<%Do while Not RS.EOF
Response.write "<tr>"
Response.write " <td bgcolor="& currentColor &"><font face=Arial size=2><a href='edrevbookingform.asp?unique="& RS("unique") &"'>"& RS("unique") &"</a></td>"
Response.write " <td bgcolor="& currentColor &"><font face=Arial size=2>"& RS("revisionno") &"</td>"
Response.write " <td bgcolor="& currentColor &"><font face=Arial size=2>"& RS("adtype") &"</td>"
Response.write " <td bgcolor="& currentColor &"><font face=Arial size=2>"& RS("advertiser") &"</td>"
Response.write " <td bgcolor="& currentColor &"><font face=Arial size=2>"& RS("edition") &"</td>"
Response.write " <td bgcolor="& currentColor &"><font face=Arial size=2>"& RS("Issue Date") &"</td>"
Response.write " <td bgcolor="& currentColor &"><font face=Arial size=2>"& RS("adsize") &"</td>"
Response.write " <td bgcolor="& currentColor &"><font face=Arial size=2>"& RS("unitinfo") &"</td>"
Response.write " <td bgcolor="& currentColor &"><font face=Arial size=2>"& RS("colour") &"</td>"
Response.write " <td bgcolor="& currentColor &"><font face=Arial size=2>"& RS("bleed") &"</td>"
Response.write " <td bgcolor="& currentColor &"><font face=Arial size=2>"& RS("bleeddetails") &"</td>"
Response.write " <td bgcolor="& currentColor &"><font face=Arial size=2>"& RS("caption") &"</td>"
Response.write " <td bgcolor="& currentColor &"><font face=Arial size=2>"& RS("mattype") &"</td>"
Response.write " <td bgcolor="& currentColor &"><font face=Arial size=2>"& RS("matnotes") &"</td>"
Response.write " <td bgcolor="& currentColor &"><font face=Arial size=2>"& RS("repeatdt") &"</td>"
Response.write " <td bgcolor="& currentColor &"><font face=Arial size=2>"& RS("dupreq") &"</td>"
Response.write " <td bgcolor="& currentColor &"><font face=Arial size=2>"& RS("joburgwam")&"</td>"
Response.write " <td bgcolor="& currentColor &"><font face=Arial size=2>"& RS("joburgcd") &"</td>"
Response.write " <td bgcolor="& currentColor &"><font face=Arial size=2>"& RS("joburgother") &"</td>"
Response.write "</tr>"
if(currentColor = colorType1)then
currentColor = colorType2
else
currentColor = colorType1
end if
RS.MoveNext
Loop
%>
</table>
</td>
</tr>
<TR>
<td colspan="2" align="middle" bgcolor="#ffffff" height="30">
<p>
<input type="button" name="doit" id="doit0" value="PRINT" onclick="print()"></p>
<p>
<br>
<input type="button" name="doit" id="doit" value="Ad Tracking Home" onclick="document.location = 'default.asp';">
</td></TR>
</table>
<br><br><br>
</body>
</html>
<%
RS.close
%>
Any help would be appreciated.