Link to home
Start Free TrialLog in
Avatar of SSF
SSF

asked on

VB script error

I got this page:

VBScript Errors Occured:
Error Number=3704

Error Descr.=Operation is not allowed when the object is closed.

Help Context=0

Source=Microsoft VBScript runtime error

Everything Went Fine. Record is updated now!
UPDATE IDDFDE100 SET IDC='',LabelName='Butazolidin I.M. Ampullen',BrandName='Butazolidin I.M.',MfgID='DE4561',GCNSeqNo='030224',RecReady='1',Notes='R.L.95 05241',Initial='SYS',ModifyDate='',AddDate='12/5/96 ',CallMfg='0',

when I ran this ASP script to update a record:

<HTML><HEAD>
<TITLE>authoreditrespond.asp</TITLE>
<body bgcolor="#FFFFFF"></HEAD>
<%
on  error resume next

form_IDC=request.form("IDC")
form_FDNum=request.form("FD Number")
form_LabelName=request.form("Label Name")
form_BrandName=request.form("Brand Name")
form_MfgID=request.form("MFG ID")
form_GCNSeqNo=request.form("GCN Sequence Number")
form_RecReady=request.form("Record Ready")
form_Notes=request.form("Notes")
form_Initial=request.form("Initial")
form_ModifyDate=request.form("Modify Date")
form_AddDate=request.form("Add Date")
form_CallMfg=request.form("Call MFG")

Set Conn = Server.CreateObject("ADODB.Connection")
conn.open "DSN=testdb;uid=SYSTEM;pwd=password"

' change apostrophe to double apostrophe
'form_name=Replace(form_name, "'", "''")

SQLstmt = "UPDATE IDDFDE100 SET "
SQLStmt = SQLstmt & "IDC='" & form_IDC & "',"
SQLstmt = SQLstmt & "LabelName='" & form_LabelName & "',"
SQLStmt = SQLstmt & "BrandName='" & form_BrandName & "',"
SQLstmt = SQLstmt & "MfgID='" & form_MfgID & "',"
SQLStmt = SQLstmt & "GCNSeqNo='" & form_GCNSeqNo & "',"
SQLstmt = SQLstmt & "RecReady='" & form_RecReady & "',"
SQLStmt = SQLstmt & "Notes='" & form_Notes & "',"
SQLstmt = SQLstmt & "Initial='" & form_Initial & "',"
SQLStmt = SQLstmt & "ModifyDate='" & form_ModifyDate & "',"
SQLstmt = SQLstmt & "AddDate='" & form_AddDate & "',"
SQLStmt = SQLstmt & "CallMfg='" & form_CallMfg & "',"

Set RS = Conn.Execute(SQLStmt)

If  err.number>0 then
      response.write "VBScript Errors Occured:" & "<P>"
      response.write "Error Number=" & err.number & "<P>"
      response.write "Error Descr.=" & err.description & "<P>"
      response.write "Help Context=" & err.helpcontext & "<P>"
      response.write "Help Path=" & err.helppath & "<P>"
      response.write "Native Error=" & err.nativeerror & "<P>"
      response.write "Source=" & err.source & "<P>"
      response.write "SQLState=" & err.sqlstate & "<P>"
end if
IF  conn.errors.count> 0 then
      response.write "Database Errors Occured" & "<P>"
      response.write SQLstmt & "<P>"
for counter= 0 to conn.errors.count
      response.write "Error #" & conn.errors(counter).number & "<P>"
      response.write "Error desc. -> " & conn.errors(counter).description & "<P>"
next
else
      response.write "<B>Everything Went Fine. Record is updated now!</b>"
      response.write "<br>" & SQLstmt
end if

rs.close
set rs=nothing
Conn.Close
set conn=nothing
%>
</BODY>
</HTML>

I'm using MS PWS and Oracle8i Lite.

ASKER CERTIFIED SOLUTION
Avatar of hes
hes
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial