Object does not support this property or method.

R

Rohan Hattangdi

I get the following error message on a line that attempts to create an
instance of an ADODB connection object.

"Object does not support this property or method: 'Server.CreateObject' ".

Now the strange thing is that other websites on that server work just fine.
Also, this website is hosted across three machines for load-balancing
purposes - the other websites are kept in sync using a tool that we have and
the files are identical across all three machines. Yet, we get this error on
only one machine.

If all the websites were having trouble I would suspect an update to the
MDAC. If all three machines were facing problems I would suspect a code
change of some sort. But the situation that I have I cannot figure out.

If anyone out there has any ideas I would greatly appreciate the assistance.

TIA,

Rohan
 
A

Aaron [SQL Server MVP]

I get the following error message on a line that attempts to create an
instance of an ADODB connection object.

"Object does not support this property or method: 'Server.CreateObject' ".

Can you show the actual line?
 
R

Rohan Hattangdi

Yes.

set con = Server.CreateObject("ADODB.Connection")

This is the line where it fails.

Thanks,

Rohan
 
R

Rohan Hattangdi

Sure. Code is below. This code had been working for quite some time and then
it stopped for a bit. It seems however that the problem is always solved
during our nightly IIS resets. Naturally this is not a good way of fixing
things ... BTW, some names have been changed below ...

dim con

dim DSN

dim cmd

dim objCMD

dim POutCon

dim JSCon



sub PunchoutConnection(rs,sql)

set POutCon = Server.CreateObject("ADODB.Connection")

POutCon.Open "File Name=C:\aigi\yyyyy.udl;"

set rs = POutCon.Execute(sql)

end sub





sub Job_Scheduler(rs,sql)

set JSCon = Server.CreateObject("ADODB.Connection")

JSCon.Open "File Name=C:\aigi\Job_Scheduler.udl;"

set rs = JSCon.Execute(sql)

end sub



set con = Server.CreateObject("ADODB.Connection")

'DSN = "DSN=udlAAAAAmsp;uid=xxxxxx;pwd=xxxxxx;"

con.ConnectionTimeout=500

'con.Open DSN



'con.Open "File Name=C:\aigi\udlAAAAAmsp.udl;"

con.Open "File Name=C:\aigi\aaaaaa.udl;"
 
R

Rohan Hattangdi

Have not tried without Server prefix ...

The MDAC thing - would that not affect every website on that box?

Thanks,

Rohan
 
A

Aaron [SQL Server MVP]

The MDAC thing - would that not affect every website on that box?

If you reinstall the same version?
 
R

Rohan Hattangdi

No, I mean ... would not an error with the MDAC affect every single website
on that box?
 
A

Aaron [SQL Server MVP]

Maybe, are you saying that this error only happens on one web site, but not
on the others? Have you considered deleting the web site from IIS, and
re-creating it?

--
http://www.aspfaq.com/
(Reverse address to reply.)
 
R

Ray Costanzo [MVP]

Before doing anything drastic, check to make sure that you don't have a
variable named "server" in your code somewhere. That could cause you to see
the error you're seeing. IE,

Dim server, z
set server = createobject("scripting.filesystemobject")
set z = server.createobject("adodb.connection")
set z= nothing
set server = nothing

Ray at home
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,054
Latest member
TrimKetoBoost

Latest Threads

Top