i am receiving the following error and have looked many places on how to fix this. i have found nothing. could any of you help me out here
here is the code for my asp page:<%
Option Explicit
Dim strConnect
%>
<html>
<head>
<meta http-equiv="Content-Type"
content="text/html; charset-iso-8859-1">
<meta name="GENTERATOR" content="Microsoft FrontPage Express 2.0">
<title>Adding a new record</title>
</head>
<body bgcolor-"#FFFFFF">
<%
Dim objRS, intFieldOne, intFieldTwo
Set objRS = Server.CreateObject ("ADODB.Recordset"
objRS.Open "Provider = SQLOLEDB: Persist Security Info= False;"&_
"User ID=sa; Initial Catalog=quotes;" &_
"Initial File Name=C:/MSSQL7/Data/master.mdf"
objRS.MoveLast
intFieldOne = objRS("PropNum"
+ 1
objRS.AddNew
objRS ("PropNum"
= intFieldOne
objRS ("SalesEng"
= intFieldTwo
objRS.UPDATE
iRecordAdded = objRS.Fields("New"
.Value
Response.Write "You've Successfully added a new record:<BR> "&_
"Prop Number = '"& objRS("PropNum"
& '"<BR>" &_
"Sales Engineer = '"& objRS("SalesEng"
objRS.Close
Set objRS= Nothing
%></body>
</html>
the exact error that i am receiving is:
ADODB.Recorset error '800a0e7d'
Operation is not allowed on an object referencing a closed or invalid connection
/add.asp, line18
thanks in advance
dana
here is the code for my asp page:<%
Option Explicit
Dim strConnect
%>
<html>
<head>
<meta http-equiv="Content-Type"
content="text/html; charset-iso-8859-1">
<meta name="GENTERATOR" content="Microsoft FrontPage Express 2.0">
<title>Adding a new record</title>
</head>
<body bgcolor-"#FFFFFF">
<%
Dim objRS, intFieldOne, intFieldTwo
Set objRS = Server.CreateObject ("ADODB.Recordset"
objRS.Open "Provider = SQLOLEDB: Persist Security Info= False;"&_
"User ID=sa; Initial Catalog=quotes;" &_
"Initial File Name=C:/MSSQL7/Data/master.mdf"
objRS.MoveLast
intFieldOne = objRS("PropNum"
objRS.AddNew
objRS ("PropNum"
objRS ("SalesEng"
objRS.UPDATE
iRecordAdded = objRS.Fields("New"
Response.Write "You've Successfully added a new record:<BR> "&_
"Prop Number = '"& objRS("PropNum"
"Sales Engineer = '"& objRS("SalesEng"
objRS.Close
Set objRS= Nothing
%></body>
</html>
the exact error that i am receiving is:
ADODB.Recorset error '800a0e7d'
Operation is not allowed on an object referencing a closed or invalid connection
/add.asp, line18
thanks in advance
dana