Dim adoCon
Dim rsDeleteEntry
Dim strSQL
Dim lngRecordNo
lngRecordNo = CLng(Request.QueryString("ID"))
lngRecordNo1 = CLng(Request.QueryString("ID"))
If Request.Form("Submit") = "Submit" Then
docket = Request.Form("docket")
name1 = Request.Form("name")
fault=Request.Form("fault")
status1 = Request.Form("status")
remarks = Request.Form("remarks")
Valid = True
If status1 = "" Then
Msg1 = " Field required."
Valid = False
End If
'-- Check ItemNumber for 4 trailing digits
'If Not IsNumeric(docket) Then
' Msg1 = " Invalid format. Use '99999'."
' Valid = False
' End If
if Valid = "True" then
Set CNObj = Server.CreateObject("ADODB.Connection")
CNObj.Open "DBQ=C:\Inetpub\wwwroot\manage\ivr.mdb;DRIVER=Micr osoft Access Driver (*.mdb)"
Set RSAdd = Server.CreateObject("ADODB.Recordset")
SQL = "insert into Itemworkorder(name,fault,status,remarks) values('" & name1 &"','"& fault &"','" & status1 & "','"& remarks & SQL= SQL & "') WHERE docket1=" & lngRecordNo
RSAdd.execute
' RSAdd.AddNew
'RSAdd.Fields("docket") = docket
'RSAdd.Fields("name") = name1
'RSAdd.Fields("fault") = fault
'RSAdd.Fields("status")=status1
'RSAdd.Fields("remarks") = remarks
'RSAdd.Update
Msg="deleted" & docket1 & "in table"
RSAdd.Close
CNObj.close
End If
End If
%>
<html>
<BODY>
<center>
<h2> Call Closing Form </h2>
<p><a href="displayworkorder.asp">Back to track </a></p>
</center>
<!-- Begin form code -->
<form name="form" method="post" action="closeclose.asp">
<center> <table width="583" border="0">
<tr> <td width="220"><div align="left"><strong>Select Docket no:</strong></div></td>
<td width="318">
<input type="text" name="docket" VALUE="<%=lngRecordNo%>" > <%=Msg1%> </td></tr>
<tr> <td><p align="left"><strong>Select Your Name</strong>:</p>
</td>
<td>
<input type="text" name="name"> </td>
</tr>
<tr> <td width="220" height="30"><div align="left"><b> Actual Fault : </b></div></td>
<td width="318"><label>
<textarea name="fault" cols="50" rows="3" wrap="virtual"></textarea>
</label></td>
</tr>
<tr colspan=2>
<td><div align="left"><strong>Status : </strong></div></td>
<td><label></label>
<label>
<input name="status" type="radio" value="closed">
closed </label>
<label>
<input name="status" type="radio" value="pending">
pending</label></td>
</tr>
<tr>
<td><div align="left"><strong>If any Remarks: </strong></div></td>
<td><label>
<textarea name="remarks" cols="50" rows="3"></textarea>
</label></td>
</tr>
</table>
<br>
<input type="Submit" name="Submit" value="Submit"><br>
<%=Msg%>
</center>
</form>
</body>
</html>
Expand|Select|Wrap|Line Numbers
- closecall
I am receiving a docket no from the previous form ,now I am going to update values into the particular record .
What is the problem in my code??????????????????