Hi all,
I have used Querystring to display the list for editing: Modify Features.asp
<%
recstMod.Open "SELECT * from FuncFeat", connectMod
Do While Not recstMod.EOF
Response.Write(recstMod("FeatName")) & "<a href='ModifyFeatures_verify.asp?FeatID=" & recstMod("FeatID") & "'> Edit</a><br>"
recstMod.MoveNext
Loop
%>
In ModifyFeatures_verify.asp, it executes a SQL command based on the value you pass across in FeatID. It also accepts user input which are meant for updates to the DB when submitted
<form method="post" action="Modify Features.asp">
<input type="hidden" name="FeatID" value="<% = recstMod("FeatID") %>">
Project ID</span>:</font></b>
<input type="text" name="ProjID" value="<% = rs("ProjID") %>" size="10" tabindex="1"></p>
Feature Name</font></b></span><b><font face="Arial" color="#333399">:</font></b>
<input type="text" name="FeatureName" value="<% = rs("FeatName") %>" size="40" tabindex="2"></p>
<p align="left"><br>
<%
Dim connectMod, recstMod
Dim FeatureID
Set connectMod = Server.CreateObject("ADODB.Connection")
connectMod.Open("DRIVER={Microsoft Access Driver (*.mdb)};" _
& "DBQ=" & Server.MapPath("Estimation.mdb"))
Set recstMod = Server.CreateObject("ADODB.RecordSet")
recstMod.Open "SELECT ProjID, FeatName FROM FeatName WHERE FeatID=" & Request.QueryString("FeatID")
recstMod.close
Set recstMod = Nothing
Set connectMod = Nothing
Response.Redirect("Modify Features.asp")
%>
When I try to run ModifyFeatures_verify.asp, this error is displayed:
Error Type:
Microsoft VBScript runtime (0x800A000D)
Type mismatch
It occurs on the line:
<input type="hidden" name="FeatID" value="<% = recstMod("FeatID") %>">
I have used Querystring to display the list for editing: Modify Features.asp
<%
recstMod.Open "SELECT * from FuncFeat", connectMod
Do While Not recstMod.EOF
Response.Write(recstMod("FeatName")) & "<a href='ModifyFeatures_verify.asp?FeatID=" & recstMod("FeatID") & "'> Edit</a><br>"
recstMod.MoveNext
Loop
%>
In ModifyFeatures_verify.asp, it executes a SQL command based on the value you pass across in FeatID. It also accepts user input which are meant for updates to the DB when submitted
<form method="post" action="Modify Features.asp">
<input type="hidden" name="FeatID" value="<% = recstMod("FeatID") %>">
Project ID</span>:</font></b>
<input type="text" name="ProjID" value="<% = rs("ProjID") %>" size="10" tabindex="1"></p>
Feature Name</font></b></span><b><font face="Arial" color="#333399">:</font></b>
<input type="text" name="FeatureName" value="<% = rs("FeatName") %>" size="40" tabindex="2"></p>
<p align="left"><br>
<%
Dim connectMod, recstMod
Dim FeatureID
Set connectMod = Server.CreateObject("ADODB.Connection")
connectMod.Open("DRIVER={Microsoft Access Driver (*.mdb)};" _
& "DBQ=" & Server.MapPath("Estimation.mdb"))
Set recstMod = Server.CreateObject("ADODB.RecordSet")
recstMod.Open "SELECT ProjID, FeatName FROM FeatName WHERE FeatID=" & Request.QueryString("FeatID")
recstMod.close
Set recstMod = Nothing
Set connectMod = Nothing
Response.Redirect("Modify Features.asp")
%>
When I try to run ModifyFeatures_verify.asp, this error is displayed:
Error Type:
Microsoft VBScript runtime (0x800A000D)
Type mismatch
It occurs on the line:
<input type="hidden" name="FeatID" value="<% = recstMod("FeatID") %>">