Link to home
Start Free TrialLog in
Avatar of Rynert
Rynert

asked on

Name redefined: 'adOpenForwardOnly'

Name redefined: 'adOpenForwardOnly'

There is only one instance of adOpenForwardOnly in the whole project.

I am therefore assuming that the file it is defined within is included twice.

However I have been unable to track this down.

I put a JavaScript alert at the top and botton of the file but I only ever get the alert 'Top' once, then the 'name redefined' error - I was expecting to get 'Top', 'Bottom', 'Top' then name defined error.

Can anybody give me some pointers for how to track this down.

Classic ASP
Windows 2003 Server
IIS6
Avatar of daveamour
daveamour
Flag of United Kingdom of Great Britain and Northern Ireland image

Avatar of Rynert
Rynert

ASKER

Sounds great but the site/download is no longer there!
Avatar of Rynert

ASKER

That has a broken installation...

Back to square one!
Avatar of Wayne Barron
Remove the 1 instance of
adOpenForwardOnly

You have it written twice, it is most likely in another page that is connected through an INCLUDE.
Just remove the 1 that the error is pointing to.
And then run your page.
And you should be good to go.

Carrzkiss
Can you provide some code please?
Also.
Do you call any include files within' a loop?
If you have an INCLUDE FILE within' a loop, then you are calling it many times.

Carrzkiss
It will be in an include file and an include file explorer is the easiest way to find it!
Here is the asp explorer - I downloaded it ages ago.
http://www.audacs.co.uk/ee/ASPExp10.zip
 
 
 
Nice little program.
Might come in handy for structuring my projects.
The Treeview (Family Tree) is a good touch.

Carrzkiss
Yes its a brilliant idea and so easy to write yourself too if you wanetd to.
I found it so valuable when working with other peoples messes!
 
Avatar of Rynert

ASKER

@carrzkiss As I said in the OP there is only one instance, removing it leaves it undeclared when it is required.  That's why I suspect it is included twice.  

@carrzkiss  I can't upload the code - if I could do that it would be small enough for me to find it.  Lots of includes, which include includes, which include includes... No loop.

@daveamour That's the same App I tried to install before and your link craps out with installation error just the same.  Maybe it doesn't like XP?

I just installed it myself and Carrzkiss did too.
I have it installed too on XP at work.
PS - yes I knew it was the same app - I thought the one you had was corrupted.
@Rynert:
If you read my post at http:Q_24427985.html?cid=238#a24448150
You will see that I refrence how Nice the little program is.

It works.
If you are getting errors then there is a problem with your computer and the installer.
You might have some more issues that you are unaware of here.

Carrzkiss
Do you maybe have another computer you can install on just to get your problem fixed.
Once you get this app working you wil fix it in 2 minutes I bet.
>>>>which include includes, which include includes...
Are you sure that you are not over-lapping that paticalur include within
Another page that is included into another page
Which is included into the page that is giving the error?

Do This. (As I mentioned before)
Remove the 1 single instance and run your page.
And see if it will load without errors?
If it runs then you are good to go.
IF it does not run, and gives you an error, then you will be in a better position to track it down.

Good Luck
Carrzkiss
What if the instance removed is in an include which is used by other pages?
Avatar of Rynert

ASKER

@ daveamour - installed it on the server and it worked ok.  However, the file that defines the variable is only in the tree once, where it should be.

None the wiser!
Don't bother looking at the tree - you want a flat file representation of all your includes and then just search through that for adOpenForwardOnly
Avatar of Rynert

ASKER

@carrzkiss - when I remove it from the one instance the SQL that needs it craps out.  It does not appear to be defined in a second place.
Ok if you really can't get this wokring at all no matter how hard you try just replace all adOpenForwardOnly with 0 as in adovbs.inc:
http://www.academyx.com/resources/documents/adovbs.txt
 
Avatar of Rynert

ASKER

@ daveamour - it's in the flat text file just once :(
Avatar of Rynert

ASKER

@ daveamour - that is the file that is included, with the same value.

Going to set it up on a new IIS website to ensure it has nothing to do with the one I am trying on.

The pages work on another site, the only difference is some path and root domain changes.
ASKER CERTIFIED SOLUTION
Avatar of daveamour
daveamour
Flag of United Kingdom of Great Britain and Northern Ireland 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
Avatar of Rynert

ASKER

<!-- METADATA TYPE="typelib" FILE="C:\Program Files\Common Files\System\ado\msado15.dll" -->

That is in the global.asa

Removed it and problem sorted!!!!!!!

Thanks :D
Ok cool - should have thought of this ages ago as it used to be a common problem but I haven't done classic ASP seriously for many years.
Its ok to have that in Global.asa but not with adovbs.inc included too I think.