Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people, just like you, are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
Solved

VB script error

Posted on 2000-04-07
1
578 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

Suggested Solutions

Title # Comments Views Activity
REReplaceNoCase help 1 43
hosting images 4 35
Two wordpress questions 3 61
Alert after MVC form submitted 1 22
I've been asked to discuss some of the UX activities that I'm using with my team. Here I will share some details about how we approach UX projects.
This article will inform Clients about common and important expectations from the freelancers (Experts) who are looking at your Gig.
Explain concepts important to validation of email addresses with regular expressions. Applies to most languages/tools that uses regular expressions. Consider email address RFCs: Look at HTML5 form input element (with type=email) regex pattern: T…
This video teaches users how to migrate an existing Wordpress website to a new domain.

856 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