T
Tom Petersen
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/maintreqresults1.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/maintreqresults1.asp?action=edit&id=700
<!-- #include file="../adovbs.inc" -->
<%
server.execute "../header.htm"
DIM objConn, objRS
Set objConn = Server.CreateObject("ADODB.Connection")
strConn= "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=c:\main\maint.mdb"
strAction = request.querystring("action")
strID = request.querystring("id")
Select Case strAction
Case "edit"
If IsNumeric(strID) Then
strID = CLng(strID)
Else
strID = 0
End If
Set objRS = Server.CreateObject("ADODB.Recordset")
strSQL = "SELECT * FROM service WHERE id=" & strID & ";"
objRS.Open strSQL, objConn, adOpenKeyset, adLockOptimistic, adCmdText
<-line 26
objRS.MoveFirst
objRS("dcomp") = Request.Form("dcomp")
objRS("time") = Request.Form("time")
objRS("reason") = Request.Form("reason")
objRS("action") = Request.Form("action")
objRS("who") = Request.Form("who")
objRS.Update
objRS.Close
Set objRS = Nothing
End Select
%>
Thanks again for all of the help!
get this error:
Error Type:
ADODB.Recordset (0x800A0E7D)
Operation is not allowed on an object referencing a closed or invalid
connection.
/forms/maintreqresults1.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/maintreqresults1.asp?action=edit&id=700
<!-- #include file="../adovbs.inc" -->
<%
server.execute "../header.htm"
DIM objConn, objRS
Set objConn = Server.CreateObject("ADODB.Connection")
strConn= "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=c:\main\maint.mdb"
strAction = request.querystring("action")
strID = request.querystring("id")
Select Case strAction
Case "edit"
If IsNumeric(strID) Then
strID = CLng(strID)
Else
strID = 0
End If
Set objRS = Server.CreateObject("ADODB.Recordset")
strSQL = "SELECT * FROM service WHERE id=" & strID & ";"
objRS.Open strSQL, objConn, adOpenKeyset, adLockOptimistic, adCmdText
<-line 26
objRS.MoveFirst
objRS("dcomp") = Request.Form("dcomp")
objRS("time") = Request.Form("time")
objRS("reason") = Request.Form("reason")
objRS("action") = Request.Form("action")
objRS("who") = Request.Form("who")
objRS.Update
objRS.Close
Set objRS = Nothing
End Select
%>
Thanks again for all of the help!