Solved

VB script error

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

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Envision that you are chipping away at another e-business site with a team of pundit developers and designers. Everything seems, by all accounts, to be going easily.
Read about why website design really matters in today's demanding market.
This tutorial demonstrates how to identify and create boundary or building outlines in Google Maps. In this example, I outline the boundaries of an enclosed skatepark within a community park.  Login to your Google Account, then  Google for "Google M…
The viewer will learn how to count occurrences of each item in an array.

707 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

Need Help in Real-Time?

Connect with top rated Experts

14 Experts available now in Live!

Get 1:1 Help Now