ADO Constants

Discussion in 'ASP General' started by CJM, Feb 11, 2004.

  1. CJM

    CJM Guest

    I'm trying to transfer an intranet app from one server to another. I'm
    having a problem with the ADO constants on the destination server.

    Our intranet site runs on the server.

    In a virtual directory, I have a seperate application that is accessible
    from the intranet.

    I have the following in the global.asa in the virtual directory:

    <!--METADATA TYPE="typelib"
    UUID="2A75196C-D9EB-4129-B803-931327F72D5C"
    NAME="Microsoft ActiveX Data Objects 2.8 Library"-->

    This usually allows me to refer to the ADO constants, e.g.

    Set rsLoc = oConn.Execute (sSQL, iAffected, adCmdText)

    However, in this case, IIS is complaining... Variable is undefined:
    'adCmdText'

    This is a new (clean) server, so I'm wondering if there is some kind of
    confirguration issue...

    Any ideas?

    Chris

    PS. I originally had the 2.6 typlib listed, which didnt work either.
    CJM, Feb 11, 2004
    #1
    1. Advertising

  2. CJM

    Ken Schaefer Guest

    You have two options:

    a) use the UUID, which means you need to know the MDAC version installed on
    the machine (you need to look in the registry to be sure)

    b) use the path to the typelib:
    <!-- METADATA TYPE="TypeLib" FILE="C:\Program Files\Common
    Files\system\ado\msado15.dll" -->
    however, you need to know the drive letter (eg c:) that the boot partition
    is. You can experiment (since there are only 24 possible letters until you
    get the right one)

    Cheers
    Ken


    "CJM" <> wrote in message
    news:%...
    : I'm trying to transfer an intranet app from one server to another. I'm
    : having a problem with the ADO constants on the destination server.
    :
    : Our intranet site runs on the server.
    :
    : In a virtual directory, I have a seperate application that is accessible
    : from the intranet.
    :
    : I have the following in the global.asa in the virtual directory:
    :
    : <!--METADATA TYPE="typelib"
    : UUID="2A75196C-D9EB-4129-B803-931327F72D5C"
    : NAME="Microsoft ActiveX Data Objects 2.8 Library"-->
    :
    : This usually allows me to refer to the ADO constants, e.g.
    :
    : Set rsLoc = oConn.Execute (sSQL, iAffected, adCmdText)
    :
    : However, in this case, IIS is complaining... Variable is undefined:
    : 'adCmdText'
    :
    : This is a new (clean) server, so I'm wondering if there is some kind of
    : confirguration issue...
    :
    : Any ideas?
    :
    : Chris
    :
    : PS. I originally had the 2.6 typlib listed, which didnt work either.
    :
    :
    Ken Schaefer, Feb 11, 2004
    #2
    1. Advertising

  3. Are you sure ADO 2.8 is installed?

    Might want to check.

    --
    Aaron Bertrand
    SQL Server MVP
    http://www.aspfaq.com/




    "CJM" <> wrote in message
    news:#...
    > I'm trying to transfer an intranet app from one server to another. I'm
    > having a problem with the ADO constants on the destination server.
    >
    > Our intranet site runs on the server.
    >
    > In a virtual directory, I have a seperate application that is accessible
    > from the intranet.
    >
    > I have the following in the global.asa in the virtual directory:
    >
    > <!--METADATA TYPE="typelib"
    > UUID="2A75196C-D9EB-4129-B803-931327F72D5C"
    > NAME="Microsoft ActiveX Data Objects 2.8 Library"-->
    >
    > This usually allows me to refer to the ADO constants, e.g.
    >
    > Set rsLoc = oConn.Execute (sSQL, iAffected, adCmdText)
    >
    > However, in this case, IIS is complaining... Variable is undefined:
    > 'adCmdText'
    >
    > This is a new (clean) server, so I'm wondering if there is some kind of
    > confirguration issue...
    >
    > Any ideas?
    >
    > Chris
    >
    > PS. I originally had the 2.6 typlib listed, which didnt work either.
    >
    >
    Aaron Bertrand - MVP, Feb 11, 2004
    #3
  4. CJM

    CJM Guest

    "Ken Schaefer" <> wrote in message
    news:...
    > You have two options:
    >
    > a) use the UUID, which means you need to know the MDAC version installed

    on
    > the machine (you need to look in the registry to be sure)
    >
    > b) use the path to the typelib:
    > <!-- METADATA TYPE="TypeLib" FILE="C:\Program Files\Common
    > Files\system\ado\msado15.dll" -->
    > however, you need to know the drive letter (eg c:) that the boot partition
    > is. You can experiment (since there are only 24 possible letters until you
    > get the right one)
    >
    > Cheers
    > Ken
    >
    >


    Ken,

    I checked in the registry and updated the UUID with the ProgID listed in the
    registry. it didnt work.

    So then I tried the 'file=' route, but had no luck with that either...

    However, I have just realised something significant: The main intranet menu
    is DB-driven - it is using the typelib specified in the main global.asa
    file, and it works fine.... So why doesnt the application in the virtual
    directory do the same?

    Cheers

    Chris
    CJM, Feb 11, 2004
    #4
  5. CJM

    CJM Guest

    Aaron,

    Yes I've checked.

    Apart from the fact that the main intranet pages work, I've also run the
    component checker. MDAC 2.8 RTM is installed.

    Any other ideas?

    This is running on Windows Server 2003 - previously I've worked with
    IIS5/5.1.... I wonder if IIS6 makes a difference...

    Chris

    "Aaron Bertrand - MVP" <> wrote in message
    news:...
    > Are you sure ADO 2.8 is installed?
    >
    > Might want to check.
    >
    > --
    > Aaron Bertrand
    > SQL Server MVP
    > http://www.aspfaq.com/
    >
    >
    >
    >
    > "CJM" <> wrote in message
    > news:#...
    > > I'm trying to transfer an intranet app from one server to another. I'm
    > > having a problem with the ADO constants on the destination server.
    > >
    > > Our intranet site runs on the server.
    > >
    > > In a virtual directory, I have a seperate application that is accessible
    > > from the intranet.
    > >
    > > I have the following in the global.asa in the virtual directory:
    > >
    > > <!--METADATA TYPE="typelib"
    > > UUID="2A75196C-D9EB-4129-B803-931327F72D5C"
    > > NAME="Microsoft ActiveX Data Objects 2.8 Library"-->
    > >
    > > This usually allows me to refer to the ADO constants, e.g.
    > >
    > > Set rsLoc = oConn.Execute (sSQL, iAffected, adCmdText)
    > >
    > > However, in this case, IIS is complaining... Variable is undefined:
    > > 'adCmdText'
    > >
    > > This is a new (clean) server, so I'm wondering if there is some kind of
    > > confirguration issue...
    > >
    > > Any ideas?
    > >
    > > Chris
    > >
    > > PS. I originally had the 2.6 typlib listed, which didnt work either.
    > >
    > >

    >
    >
    CJM, Feb 11, 2004
    #5
  6. CJM

    Ryan N. Guest

    Make sure you have a global.asa file in each ASP application or subweb root.

    --
    Cheers!

    Ryan N.
    ---------------------------------
    Funny...this worked yesterday....
    "CJM" <> wrote in message
    news:%...
    > I'm trying to transfer an intranet app from one server to another. I'm
    > having a problem with the ADO constants on the destination server.
    >
    > Our intranet site runs on the server.
    >
    > In a virtual directory, I have a seperate application that is accessible
    > from the intranet.
    >
    > I have the following in the global.asa in the virtual directory:
    >
    > <!--METADATA TYPE="typelib"
    > UUID="2A75196C-D9EB-4129-B803-931327F72D5C"
    > NAME="Microsoft ActiveX Data Objects 2.8 Library"-->
    >
    > This usually allows me to refer to the ADO constants, e.g.
    >
    > Set rsLoc = oConn.Execute (sSQL, iAffected, adCmdText)
    >
    > However, in this case, IIS is complaining... Variable is undefined:
    > 'adCmdText'
    >
    > This is a new (clean) server, so I'm wondering if there is some kind of
    > confirguration issue...
    >
    > Any ideas?
    >
    > Chris
    >
    > PS. I originally had the 2.6 typlib listed, which didnt work either.
    >
    >
    Ryan N., Feb 11, 2004
    #6
  7. CJM

    CJM Guest

    Re: ADO Constants (solved?)

    As per usual, the problem existed between chair and keyboard..!

    My application is actually in a subdir of the intranet content area. This in
    itself was a virtual directory.
    However, my application directory was NOT a virtual directory, therefore the
    global.asa would surely be ignored.

    The app directory is now a pukka virtual directory! The application works...

    The only think puzzling me now is how/why the app was able to pick up the
    connection string which was defined in an application variable in the same
    Global.asa??

    Chris
    CJM, Feb 11, 2004
    #7
  8. Re: ADO Constants (solved?)

    Maybe the connection string is also defined in the ROOT's global.asa file.

    --
    Aaron Bertrand
    SQL Server MVP
    http://www.aspfaq.com/




    "CJM" <> wrote in message
    news:...
    > As per usual, the problem existed between chair and keyboard..!
    >
    > My application is actually in a subdir of the intranet content area. This

    in
    > itself was a virtual directory.
    > However, my application directory was NOT a virtual directory, therefore

    the
    > global.asa would surely be ignored.
    >
    > The app directory is now a pukka virtual directory! The application

    works...
    >
    > The only think puzzling me now is how/why the app was able to pick up the
    > connection string which was defined in an application variable in the same
    > Global.asa??
    >
    > Chris
    >
    >
    Aaron Bertrand - MVP, Feb 11, 2004
    #8
  9. CJM

    CJM Guest

    Re: ADO Constants (solved?)

    It's not in the site root global.asa, and the parent virtual dir doesnt have
    one...

    Curious...


    "Aaron Bertrand - MVP" <> wrote in message
    news:...
    > Maybe the connection string is also defined in the ROOT's global.asa file.
    >
    > --
    > Aaron Bertrand
    > SQL Server MVP
    > http://www.aspfaq.com/
    >
    CJM, Feb 11, 2004
    #9
  10. Re: ADO Constants (solved?)

    > It's not in the site root global.asa, and the parent virtual dir doesnt
    have
    > one...
    >
    > Curious...


    Sorry, without being able to reproduce, I guess you've discovered one of the
    world's greatest mysteries.

    <shrug>
    Aaron Bertrand - MVP, Feb 11, 2004
    #10
  11. CJM

    CJM Guest

    Re: ADO Constants (solved?)

    "Aaron Bertrand - MVP" <> wrote in message news:O%
    >
    > Sorry, without being able to reproduce, I guess you've discovered one of

    the
    > world's greatest mysteries.
    >


    Luckily, I dont think it is of global significance.

    > <shrug>


    Indeed.
    CJM, Feb 11, 2004
    #11
  12. CJM

    Ken Schaefer Guest

    The virtual directory is probably configured as an "Application Root", in
    which case you need to put your own global.asa file in the application root
    as well. Each Application Root maintains it's own Application/Session state

    Cheers
    Ken

    "CJM" <> wrote in message
    news:...
    :
    : "Ken Schaefer" <> wrote in message
    : news:...
    : > You have two options:
    : >
    : > a) use the UUID, which means you need to know the MDAC version installed
    : on
    : > the machine (you need to look in the registry to be sure)
    : >
    : > b) use the path to the typelib:
    : > <!-- METADATA TYPE="TypeLib" FILE="C:\Program Files\Common
    : > Files\system\ado\msado15.dll" -->
    : > however, you need to know the drive letter (eg c:) that the boot
    partition
    : > is. You can experiment (since there are only 24 possible letters until
    you
    : > get the right one)
    : >
    : > Cheers
    : > Ken
    : >
    : >
    :
    : Ken,
    :
    : I checked in the registry and updated the UUID with the ProgID listed in
    the
    : registry. it didnt work.
    :
    : So then I tried the 'file=' route, but had no luck with that either...
    :
    : However, I have just realised something significant: The main intranet
    menu
    : is DB-driven - it is using the typelib specified in the main global.asa
    : file, and it works fine.... So why doesnt the application in the virtual
    : directory do the same?
    :
    : Cheers
    :
    : Chris
    :
    :
    Ken Schaefer, Feb 12, 2004
    #12
    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. Carlos Santana

    Next Evolution in ADO.NET

    Carlos Santana, Aug 14, 2003, in forum: ASP .Net
    Replies:
    0
    Views:
    1,152
    Carlos Santana
    Aug 14, 2003
  2. nita
    Replies:
    1
    Views:
    857
    Saravana
    Nov 20, 2004
  3. ronaldlee

    Transfer ADO Code to ADO.NET

    ronaldlee, Dec 17, 2004, in forum: ASP .Net
    Replies:
    1
    Views:
    446
    Kevin Spencer
    Dec 17, 2004
  4. Replies:
    0
    Views:
    1,302
  5. Navin
    Replies:
    1
    Views:
    674
    Ken Schaefer
    Sep 9, 2003
Loading...

Share This Page