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!

runtime vb error

Status
Not open for further replies.

danalynn

Programmer
Jun 12, 2001
25
0
0
US
I am receiving the following error
Microsoft VBScript runtime error '800a0411'
Name redefined 'adOpenForwardOnly'
/adovbs.inc, line 14

does anyone know how to fix this?

i only have 2 days left with my internship and don't know what to do.

HELP!!!!!!!!!!!
 


danalyn,

This means you have two definitions of 'adOpenForwardOnly'. Probably one in adovbs.inc and another on your ASP page.
You only need to have one declaration.

Cheers,
Fengshui1998
 
i have already checked that, i do not see it on my page and have checked the file

here is my code:<%@Language=VBScript%>
<%Option Explicit%>
<!--#INCLUDE FILE=&quot;adovbs.inc&quot;-->
<%
Dim strConnect
Dim objRS, PropNum, SalesEng
Dim objConn
Dim strSQL
%>

<html>

<head>
<meta http-equiv=&quot;Content-Type&quot;
content=&quot;text/html; charset=iso-8859-1&quot;>
<meta name=&quot;GENERATOR&quot; content=&quot;Microsoft FrontPage Express 2.0&quot;>
<title>Adding a new record</title>
</head>

<body bgcolor=&quot;#DA70D6&quot;>
<%
PropNum = Request(&quot;PropNumb&quot;)
SalesEng= Request(&quot;SalesEngi&quot;)

Set objConn = Server.CreateObject (&quot;ADODB.Connection&quot;)
objConn.Open &quot;Provider=SQLOLEDB;Server=BURIADATA2EDCGE;Database=SCQUOTES;User ID=sa;PWD=;&quot;
Set objRS= Server.CreateObject (&quot;ADODB.Recordset&quot;)
objRS.Open strSQL, objConn, adOpenKeyset, adLockPessimistic, adCmdText
strSQL = &quot;Select * FROM Quotes&quot;
objRS.AddNew
objRS.Fields(&quot;text_field&quot;) = CStr(SalesEng)
objRS.Fields(&quot;integer_field&quot;) = CInt(PropNum)
objRS.UPDATE
Response.Write &quot;You've successfully added a new record:<BR> &quot;&_
&quot;Prop Number = '&quot;& PropNum & &quot;'<BR>&quot;&_
&quot;Sales Engineer = '&quot;& SalesEng
objConn.Close
objRS.Close
Set objRS= Nothing
Set objConn=Nothing
%></body>
</html>


 
danalynn,

'adOpenForwardOnly' does not appear in your web page code. I hate to ask, but have you checked adovbs.inc? And are you sure you are pointing to the only adovbs.inc?

fengshui1998

 
I have checked the file and pretty much everything else, i didn't know if there was some logical reason why i was getting this error.

thanks for the try though
 
danalynn,

The only thing else I can think of is that your adovbs.inc points to another file?? or definition of that variable.

Since your error points to line 14 in adovbs.inc, it says there is a re-definition before anything else occurs on your web page. So it must come from adovbs.inc.

Good luck

fengshui1998
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top