Solved

VB script error

Posted on 2000-04-07
1
576 Views
Last Modified: 2012-05-04
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.

0
Comment
Question by:SSF
1 Comment
 
LVL 20

Accepted Solution

by:
hes earned 50 total points
ID: 2694759
After your :
Set Conn = Server.CreateObject("ADODB.Connection")
 add:



Set RS=Server.CreateObject("ADODB.RecordSet")
0

Featured Post

Master Your Team's Linux and Cloud Stack

Come see why top tech companies like Mailchimp and Media Temple use Linux Academy to build their employee training programs.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Learn by example how to specify CSS selectors for Selenium WebDriver test automation software.
Does your audience prefer people in photos or no people? How can you best highlight what you’re selling? What are your competitors doing, and what can you do that is different and unique from them?  Continue reading to learn how to make your images …
The viewer will learn how to look for a specific file type in a local or remote server directory using PHP.
The viewer will learn how to create and use a small PHP class to apply a watermark to an image. This video shows the viewer the setup for the PHP watermark as well as important coding language. Continue to Part 2 to learn the core code used in creat…

776 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question