Advertisement
Advertisement
| 04.23.2008 at 02:27PM PDT, ID: 23348441 |
|
[x]
Attachment Details
|
||
1: 2: 3: 4: 5: 6: 7: 8: 9: 10: 11: 12: 13: 14: 15: 16: 17: 18: 19: 20: 21: 22: 23: 24: 25: 26: 27: 28: 29: 30: 31: 32: 33: 34: 35: 36: 37: 38: 39: 40: 41: |
The Form (manageLinks2.asp)
<FORM action="linkUpdate.asp" method="post">
<table>
<tr>
<td>LID</td>
<td>Name</td>
<td>URL</td>
<td>Weight</td>
</tr>
<tr>
<td><input name="linkID" type="text" disabled="disabled" size="2" value="<%= rsEdit("LinkID") %>" /></td>
<td><input name="linkName" type="text" size="30" value="<%= rsEdit("LinkName") %>" /></td>
<td><input name="linkURL" type="text" size="30" value="<%= rsEdit("LinkURL") %>" /></td>
<td><input name="linkWeight" type="text" size="2" value="<%= rsEdit("LinkWeight") %>" /></td>
</tr>
</table>
<input type="submit" />
</FORM>
The Submission Page (linkUpdate.asp)
<%
Set conn = server.createobject("adodb.connection")
DSNtemp="DRIVER={Microsoft Access Driver (*.mdb)}; "
DSNtemp=dsntemp & "DBQ=" & server.mappath("../sfsDb.mdb")
conn.Open DSNtemp
SQLstmt = "UPDATE Links SET "
SQLstmt = SQLstmt & "LinkName='" & TRIM(Request.Form("linkName")) & "', "
SQLstmt = SQLstmt & "LinkURL'" & TRIM(Request.Form("linkURL")) & "', "
SQLstmt = SQLstmt & "LinkWeight" & TRIM(Request.Form("linkWeight"))
SQLstmt = SQLstmt & " WHERE LinkID=" & TRIM(Request.Form("linkID"))
conn.Close
Set conn = nothing
Set SQLstmt = nothing
'Return to the update select page in case another record needs deleting
Response.Redirect "manageLinks2.asp"
%>
|