0040 in ASP giving "Duplicate parameter name" error

Posted on 2005-02-28
Medium Priority
Last Modified: 2007-11-27
I am attempting to upgrade to the latest version of Ora Net Manager and 0040 from  We are running IIS on Win2003 connecting to Oracle on Win2003.

Our DB connection string was like this:
Set db = CreateObject("OracleInProcServer.XOraSession"). _
                        OpenDatabase(DB_CONNECT, DB_ACCOUNT, 0)

now we have the default global.asa from 0040 and
                 set db = OraSession.getDatabaseFromPool(10)

Some of our ASP pages are generating this error on a second load.  

Oracle Automation error '800a01b8'
OIP-04123: Duplicate parameter name, PARAM_ID

The error is caused by: db.Parameters.Add "PARAM_ID" not being removed properly.

1) Is there a way to tell IIS / ASP Parser to ignore these error that doesn't degrade the system?  I know an On Error Resume Next may work, but seems to stall page loads.
2) Or, is there a way to loop through all db.Parameters and remove them?  

I have unremoved parameters on about 1000 pages, so a simple routine to 'db.Parameters.Remove' all of them would save weeks of coding.

Thank you in advance for any advice.
Question by:egarrison
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
LVL 77

Accepted Solution

slightwv (䄆 Netminder) earned 2000 total points
ID: 13429644
It's been several years since I've messed with ASP and OO4O so I probably won't be able to provide a 100% answer but let's see if I can get you there.

The docs on OO4O state that parameters are a collection and can be accessed as such:

snipit from: http://download-west.oracle.com/docs/cd/B10501_01/win.920/a95895/o4o00210.htm

The OraParameters collection maintains a list of OraParameter objects. Unlike the other collection objects, this list is modifiable; you can add to and remove from the collection.


You can access the OraParameter objects in this collection by subscripting (using ordinal integers) or by using the name the object was given at its creation. You can obtain the number of OraParameter objects in the collection by using the Count property. Referencing a subscript that does not lie within the collection (0 to Count-1) results in the return of a NULL OraParameter object.

In addition to accessing the OraParameter objects of the collection, you can use the collection to create and destroy parameters by using the Add and Remove methods, respectively.

end snipit

Therefore you should be able to go through a loop and remove them.

Author Comment

ID: 13434233
Yes. You are right.  I forgot that they are considered a "Collection". Doing a .COUNT does give the number of Vars "Added".  A simple loop and remove of them by number does work. Thank you for pointing me in the right direction.  

Here is what I added to the footer file.  

do while i > 0
    db.Parameters.Remove i

Featured Post

Microsoft Certification Exam 74-409

Veeam® is happy to provide the Microsoft community with a study guide prepared by MVP and MCT, Orin Thomas. This guide will take you through each of the exam objectives, helping you to prepare for and pass the examination.

Question has a verified solution.

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

Note: this article covers simple compression. Oracle introduced in version 11g release 2 a new feature called Advanced Compression which is not covered here. General principle of Oracle compression Oracle compression is a way of reducing the d…
Background In several of the companies I have worked for, I noticed that corporate reporting is off loaded from the production database and done mainly on a clone database which needs to be kept up to date daily by various means, be it a logical…
Via a live example show how to connect to RMAN, make basic configuration settings changes and then take a backup of a demo database
This video shows how to Export data from an Oracle database using the Datapump Export Utility.  The corresponding Datapump Import utility is also discussed and demonstrated.
Suggested Courses

800 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