I have been copying and pasting code and this has been working, but now I
get this error:
Error Type:
ADODB.Recordset (0x800A0E7D)
Operation is not allowed on an object referencing a closed or invalid
connection.
/forms/maintreqresults 1.asp, line 26.
I'm sure I'm missing something simple, but I am at a loss with this. The
code is below, the URL string appears to be valid:
http://sd-school/forms/maintreqresul...on=edit&id=700
<!-- #include file="../adovbs.inc" -->
<%
server.execute "../header.htm"
DIM objConn, objRS
Set objConn = Server.CreateOb ject("ADODB.Con nection")
strConn= "Provider=Micro soft.Jet.OLEDB. 4.0;Data Source=c:\main\ maint.mdb"
strAction = request.queryst ring("action")
strID = request.queryst ring("id")
Select Case strAction
Case "edit"
If IsNumeric(strID ) Then
strID = CLng(strID)
Else
strID = 0
End If
Set objRS = Server.CreateOb ject("ADODB.Rec ordset")
strSQL = "SELECT * FROM service WHERE id=" & strID & ";"
objRS.Open strSQL, objConn, adOpenKeyset, adLockOptimisti c, adCmdText
<-line 26
objRS.MoveFirst
objRS("dcomp") = Request.Form("d comp")
objRS("time") = Request.Form("t ime")
objRS("reason") = Request.Form("r eason")
objRS("action") = Request.Form("a ction")
objRS("who") = Request.Form("w ho")
objRS.Update
objRS.Close
Set objRS = Nothing
End Select
%>
Thanks again for all of the help!