Object does not support this property or method.

Discussion in 'ASP General' started by Rohan Hattangdi, Aug 24, 2004.

  1. 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
     
    Rohan Hattangdi, Aug 24, 2004
    #1
    1. Advertising

  2. > 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?

    --
    http://www.aspfaq.com/
    (Reverse address to reply.)
     
    Aaron [SQL Server MVP], Aug 24, 2004
    #2
    1. Advertising

  3. Yes.

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

    This is the line where it fails.

    Thanks,

    Rohan


    "Aaron [SQL Server MVP]" <> wrote in message
    news:...
    > > 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?
    >
    > --
    > http://www.aspfaq.com/
    > (Reverse address to reply.)
    >
    >
     
    Rohan Hattangdi, Aug 24, 2004
    #3
  4. We need to see more code. (no html please)

    Has it ever worked?

    Rohan Hattangdi wrote:
    > Yes.
    >
    > set con = Server.CreateObject("ADODB.Connection")
    >
    > This is the line where it fails.
    >
    > Thanks,
    >
    > Rohan
    >
    >
    > "Aaron [SQL Server MVP]" <> wrote in message
    > news:...
    >>> 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?
    >>
    >> --
    >> http://www.aspfaq.com/
    >> (Reverse address to reply.)


    --
    Microsoft MVP -- ASP/ASP.NET
    Please reply to the newsgroup. The email account listed in my From
    header is my spam trap, so I don't check it very often. You will get a
    quicker response by posting to the newsgroup.
     
    Bob Barrows [MVP], Aug 24, 2004
    #4
  5. Did you try without the Server prefix?

    Did you try reinstalling MDAC (not necessarily an upgrade, but more of a
    repair)?

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




    "Rohan Hattangdi" <> wrote in message
    news:...
    > Yes.
    >
    > set con = Server.CreateObject("ADODB.Connection")
    >
    > This is the line where it fails.
    >
    > Thanks,
    >
    > Rohan
    >
    >
    > "Aaron [SQL Server MVP]" <> wrote in message
    > news:...
    > > > 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?
    > >
    > > --
    > > http://www.aspfaq.com/
    > > (Reverse address to reply.)
    > >
    > >

    >
    >
     
    Aaron [SQL Server MVP], Aug 24, 2004
    #5
  6. 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;"



    "Bob Barrows [MVP]" <> wrote in message
    news:ODbRQ$...
    > We need to see more code. (no html please)
    >
    > Has it ever worked?
    >
    > Rohan Hattangdi wrote:
    > > Yes.
    > >
    > > set con = Server.CreateObject("ADODB.Connection")
    > >
    > > This is the line where it fails.
    > >
    > > Thanks,
    > >
    > > Rohan
    > >
    > >
    > > "Aaron [SQL Server MVP]" <> wrote in message
    > > news:...
    > >>> 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?
    > >>
    > >> --
    > >> http://www.aspfaq.com/
    > >> (Reverse address to reply.)

    >
    > --
    > Microsoft MVP -- ASP/ASP.NET
    > Please reply to the newsgroup. The email account listed in my From
    > header is my spam trap, so I don't check it very often. You will get a
    > quicker response by posting to the newsgroup.
    >
    >
     
    Rohan Hattangdi, Aug 24, 2004
    #6
  7. Have not tried without Server prefix ...

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

    Thanks,

    Rohan

    "Aaron [SQL Server MVP]" <> wrote in message
    news:...
    > Did you try without the Server prefix?
    >
    > Did you try reinstalling MDAC (not necessarily an upgrade, but more of a
    > repair)?
    >
    > --
    > http://www.aspfaq.com/
    > (Reverse address to reply.)
    >
    >
    >
    >
    > "Rohan Hattangdi" <> wrote in message
    > news:...
    > > Yes.
    > >
    > > set con = Server.CreateObject("ADODB.Connection")
    > >
    > > This is the line where it fails.
    > >
    > > Thanks,
    > >
    > > Rohan
    > >
    > >
    > > "Aaron [SQL Server MVP]" <> wrote in message
    > > news:...
    > > > > 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?
    > > >
    > > > --
    > > > http://www.aspfaq.com/
    > > > (Reverse address to reply.)
    > > >
    > > >

    > >
    > >

    >
    >
     
    Rohan Hattangdi, Aug 24, 2004
    #7
  8. > The MDAC thing - would that not affect every website on that box?

    If you reinstall the same version?
     
    Aaron [SQL Server MVP], Aug 24, 2004
    #8
  9. No, I mean ... would not an error with the MDAC affect every single website
    on that box?

    "Aaron [SQL Server MVP]" <> wrote in message
    news:%...
    > > The MDAC thing - would that not affect every website on that box?

    >
    > If you reinstall the same version?
    >
    >
     
    Rohan Hattangdi, Aug 24, 2004
    #9
  10. 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.)




    "Rohan Hattangdi" <> wrote in message
    news:...
    > No, I mean ... would not an error with the MDAC affect every single

    website
    > on that box?
    >
    > "Aaron [SQL Server MVP]" <> wrote in message
    > news:%...
    > > > The MDAC thing - would that not affect every website on that box?

    > >
    > > If you reinstall the same version?
    > >
    > >

    >
    >
     
    Aaron [SQL Server MVP], Aug 24, 2004
    #10
  11. 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

    "Rohan Hattangdi" <> wrote in message
    news:...
    > 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
    >
    >
     
    Ray Costanzo [MVP], Aug 24, 2004
    #11
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. todd
    Replies:
    3
    Views:
    5,872
  2. Roman
    Replies:
    0
    Views:
    4,065
    Roman
    Jan 4, 2004
  3. zdrakec
    Replies:
    0
    Views:
    616
    zdrakec
    Sep 26, 2007
  4. Roberta McGervey

    Object Does not support this property or Method error

    Roberta McGervey, Jan 26, 2004, in forum: ASP General
    Replies:
    7
    Views:
    186
    Bob Barrows
    Jan 27, 2004
  5. Replies:
    7
    Views:
    132
    Ian Collins
    Apr 27, 2006
Loading...

Share This Page