hi guys me again
i am just not getting why this stuff isn't working. i took all your guys' advice and put it together and i should have something that is actually working, but now i am getting this error:
Microsoft VBScript runtime error '800a000d'
Type mismatch:'[string:"CP-051499"]'
/add.asp, line 25
line 25 is objRS.open "Quotes", objConn
here is my whole code:<%
Option Explicit
%>
<%
Dim objRs, intFieldOne, intFieldTwo
Dim objConn
Dim strConnect
Dim strSQL
%>
<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">
<%
Set objConn = Server.CreateObject ("ADODB.COnnection"
objConn.Open "Provider=SQLELEDB; Server=servername; Database=databasename; User ID=sa;PWD=;"
Set objRS= Server.CreateObject ("ADODB.Recordset"
objRS.Open "Quotes", objConn
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"
objConn.Close
objRS.Close
Set objConn = Nothing
Set objRS = Nothing
%></body>
</html>
if anyone can help me i would greatly appreciate it!!!!
thanks so much
Dana
i am just not getting why this stuff isn't working. i took all your guys' advice and put it together and i should have something that is actually working, but now i am getting this error:
Microsoft VBScript runtime error '800a000d'
Type mismatch:'[string:"CP-051499"]'
/add.asp, line 25
line 25 is objRS.open "Quotes", objConn
here is my whole code:<%
Option Explicit
%>
<%
Dim objRs, intFieldOne, intFieldTwo
Dim objConn
Dim strConnect
Dim strSQL
%>
<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">
<%
Set objConn = Server.CreateObject ("ADODB.COnnection"
objConn.Open "Provider=SQLELEDB; Server=servername; Database=databasename; User ID=sa;PWD=;"
Set objRS= Server.CreateObject ("ADODB.Recordset"
objRS.Open "Quotes", objConn
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"
objConn.Close
objRS.Close
Set objConn = Nothing
Set objRS = Nothing
%></body>
</html>
if anyone can help me i would greatly appreciate it!!!!
thanks so much
Dana