Trying to update a record, runtime Error???


Does anyone know why I am getting this message when I try to update a record.
====error message======
Microsoft VBScript runtime error '800a0411'

Name redefined: 'adOpenForwardOnly'

/GPDataClear/Manager/adovbs.inc, line 14



Here is my code below...
========ManagerUpdate.asp==============================
<%@ Language=VBScript %>
<%Response.Buffer = True%>







<%
dim TConn
dim QUser
dim WUID
dim RS
dim UpKey

Upkey = Request.Form("txtUserID")
UpKey = Trim(UpKey)

set TConn = Server.CreateObject("ADODB.Connection")
TConn.Open("DRIVER={Microsoft Access Driver (*.mdb)}; DBQ=" & Server.MapPath("GPDataCleardbsGP3rdParty.mdb"))

WUID = "Select * From USERS where USERID ='"
WUID = WUID & UpKey & "'"
set RS = TConn.Execute(WUID)

While not RS.EOF
RS("UserID")="josegon"
RS.update
RS.close
set RS = nothing
wend

%>

 



======================================
Here is a few lines from adovbs.inc file
========================================
<%
'--------------------------------------------------------------------
' Microsoft ADO
'
' (c) 1996-1998 Microsoft Corporation. All Rights Reserved.
'
'
'
' ADO constants include file for VBScript
'
'--------------------------------------------------------------------

'---- CursorTypeEnum Values ----
Const adOpenForwardOnly = 0 '<---LINE 14
Const adOpenKeyset = 1
Const adOpenDynamic = 2
Const adOpenStatic = 3
==============================================

Jose


Comments

  • : ====error message======
    : Microsoft VBScript runtime error '800a0411'
    :
    : Name redefined: 'adOpenForwardOnly'
    :
    : /GPDataClear/Manager/adovbs.inc, line 14
    :
    : ======================================
    : Here is a few lines from adovbs.inc file
    : ========================================
    : '---- CursorTypeEnum Values ----
    : Const adOpenForwardOnly = 0 '<---LINE 14


    Right. The error message says quite clearly that the name 'adOpenForwardOnly' is redefined. Now this means that it has been declared twice. Once in the adovbs.inc file and most likely once in the other include file you had. The solution would be to comment or delete the line from the other include file where the 'adOpen...' is declared.

    Remo

Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

In this Discussion