Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Microsoft VBScript runtime error '800a000d'

Status
Not open for further replies.

danalynn

Programmer
Jun 12, 2001
25
0
0
US
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=&quot;Content-Type&quot;
content=&quot;text/html; charset-iso-8859-1&quot;>
<meta name=&quot;GENTERATOR&quot; content=&quot;Microsoft FrontPage Express 2.0&quot;>
<title>Adding a new record</title>
</head>

<body bgcolor-&quot;#FFFFFF&quot;>
<%
Set objConn = Server.CreateObject (&quot;ADODB.COnnection&quot;)
objConn.Open &quot;Provider=SQLELEDB; Server=servername; Database=databasename; User ID=sa;PWD=;&quot;
Set objRS= Server.CreateObject (&quot;ADODB.Recordset&quot;)
objRS.Open &quot;Quotes&quot;, objConn
objRS.MoveLast
intFieldOne = objRS(&quot;PropNum&quot;) +1
objRS.AddNew
objRS(&quot;PropNum&quot;) = intFieldOne
objRS(&quot;SalesEng&quot;) = intFieldTwo
objRS.UPDATE
iRecordAdded = objRS.Fields(&quot;New&quot;).Value
Response.Write &quot;You've successfully added a new record:<BR>&quot;&_
&quot;Prop NUmber = '&quot;& objRS(&quot;PropNum&quot;) & &quot;'<BR>&quot;&_
&quot;Sales Engineer = '&quot;& objRS(&quot;SalesEng&quot;)

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

 
danalynn,

I'm assuming line 25 is:
intFieldOne = objRS(&quot;PropNum&quot;) +1
If this is true, you are trying to add a string to a number and that is why you are getting &quot;type mismatch&quot;.

What are you trying to do? and what are the field types for:
objRS(&quot;PropNum&quot;) integer or string?
objRS(&quot;SalesEng&quot;) integer or string?

fengshui1998

 
it is a string

i thought that it would move to the next line.

i am so confused

dana
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top