Advertisement

04.23.2008 at 02:27PM PDT, ID: 23348441
[x]
Attachment Details

ASP Failing to Update Access Database?

Asked by WavyGravy in Active Server Pages (ASP)

Tags: ,

For some reason, the following code is designed take input from a form, and update a record in the database, and for whatever reason, it's not doing it.  No errors are generated when execute the script also which is leaving me at a dead end.Start Free Trial
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"
%>
[+][-]04.23.2008 at 02:35PM PDT, ID: 21425663

View this solution now by starting your 7-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zone: Active Server Pages (ASP)
Tags: ASP, Internet Exploder 6.0
Sign Up Now!
Solution Provided By: hielo
Participating Experts: 3
Solution Grade: A
 
 
[+][-]04.23.2008 at 02:36PM PDT, ID: 21425669

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]04.23.2008 at 11:20PM PDT, ID: 21428114

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]04.24.2008 at 04:05AM PDT, ID: 21429465

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]04.24.2008 at 04:16AM PDT, ID: 21429529

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
 
Loading Advertisement...
20080716-EE-VQP-32 / EE_QW_2_20070628