Ask a Question related to ASP Database, Design and Development.

  1. #1

    Default ADO Constants

    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 Guest

  2. Similar Questions and Discussions

    1. constants
      hi, why should I use constants? thx for help Michael
    2. ASP Constants
      Hi, In order to create an ADO connection and gets it running, I have to declare the ADO constants as : "<!-- METADATA TYPE = "Typelib" File =...
    3. Using Constants
      I'm considering using constants for some predefined paths in my script, like HTML_DIR, INC_DIR. These values won't change and they will be global...
    4. VBS Constants
      I realize that this isn't a VBS newsgroup, but it's the only Microsoft newsgroup I read regularly so I hope that you'll be gentle with me. Where...
    5. RDoc now does constants
      I've added experimental support for documenting constants to RDoc. Right now it's only in the CVS version, and only the default HTML template makes...
  3. #2

    Default Re: ADO Constants

    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" <cjmwork@yahoo.co.uk> wrote in message
    news:%23oIiYzJ8DHA.2316@TK2MSFTNGP09.phx.gbl...
    : 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 Guest

  4. #3

    Default Re: ADO Constants

    Are you sure ADO 2.8 is installed?

    Might want to check.

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




    "CJM" <cjmwork@yahoo.co.uk> wrote in message
    news:#oIiYzJ8DHA.2316@TK2MSFTNGP09.phx.gbl...
    > 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 Guest

  5. #4

    Default Re: ADO Constants


    "Ken Schaefer" <kenREMOVE@THISadOpenStatic.com> wrote in message
    news:uHG2m8J8DHA.2924@tk2msftngp13.phx.gbl...
    > 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 Guest

  6. #5

    Default Re: ADO Constants

    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" <aaron@TRASHaspfaq.com> wrote in message
    news:ucExllK8DHA.1596@TK2MSFTNGP10.phx.gbl...
    > Are you sure ADO 2.8 is installed?
    >
    > Might want to check.
    >
    > --
    > Aaron Bertrand
    > SQL Server MVP
    > [url]http://www.aspfaq.com/[/url]
    >
    >
    >
    >
    > "CJM" <cjmwork@yahoo.co.uk> wrote in message
    > news:#oIiYzJ8DHA.2316@TK2MSFTNGP09.phx.gbl...
    > > 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 Guest

  7. #6

    Default Re: ADO Constants

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

    --
    Cheers!

    Ryan N.
    ---------------------------------
    Funny...this worked yesterday....
    "CJM" <cjmwork@yahoo.co.uk> wrote in message
    news:%23oIiYzJ8DHA.2316@TK2MSFTNGP09.phx.gbl...
    > 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. Guest

  8. #7

    Default 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 Guest

  9. #8

    Default Re: ADO Constants (solved?)

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

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




    "CJM" <cjmwork@yahoo.co.uk> wrote in message
    news:O7ajr4K8DHA.1040@TK2MSFTNGP10.phx.gbl...
    > 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 Guest

  10. #9

    Default 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" <aaron@TRASHaspfaq.com> wrote in message
    news:OCzCo6K8DHA.1816@TK2MSFTNGP12.phx.gbl...
    > Maybe the connection string is also defined in the ROOT's global.asa file.
    >
    > --
    > Aaron Bertrand
    > SQL Server MVP
    > [url]http://www.aspfaq.com/[/url]
    >

    CJM Guest

  11. #10

    Default 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 Guest

  12. #11

    Default Re: ADO Constants (solved?)

    "Aaron Bertrand - MVP" <aaron@TRASHaspfaq.com> 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 Guest

  13. #12

    Default Re: ADO Constants

    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" <cjmwork@yahoo.co.uk> wrote in message
    news:eb1SPtK8DHA.1936@TK2MSFTNGP12.phx.gbl...
    :
    : "Ken Schaefer" <kenREMOVE@THISadOpenStatic.com> wrote in message
    : news:uHG2m8J8DHA.2924@tk2msftngp13.phx.gbl...
    : > 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 Guest

  14. #13

    Default Re: ADO Constants (solved?)

    Hi Chris,

    I also failed to reproduce the problem based on the limited information.
    How did you open the connection with the connection string in Global.asa?
    We may try a test: modify the connection in Global.asa, for example, change
    to a invalid user name and execute the ASP application again. WIll it
    failed to open the connection?

    Luke
    Microsoft Online Support

    Get Secure! [url]www.microsoft.com/security[/url]
    (This posting is provided "AS IS", with no warranties, and confers no
    rights.)

    [MSFT] Guest

  15. #14

    Default Re: ADO Constants (solved?)

    The was as much information as was needed, I think. The problem was local to
    this one machine - I havent noticed similar behaviour (with apparently the
    same setup) on other servers.

    From memory, I think I did try the 'test' while I was trying to debug the
    problem, and it responded appropriately.
    However, I've made the folder into a virtual directory now, so I'm not going
    to roll it back to confirm this test.

    I'm happy to leave it as is.

    Thanks for your help anyway.

    Chris

    "[MSFT]" <lukezhan@online.microsoft.com> wrote in message
    news:RcssIvT8DHA.1152@cpmsftngxa07.phx.gbl...
    > Hi Chris,
    >
    > I also failed to reproduce the problem based on the limited information.
    > How did you open the connection with the connection string in Global.asa?
    > We may try a test: modify the connection in Global.asa, for example,
    change
    > to a invalid user name and execute the ASP application again. WIll it
    > failed to open the connection?
    >
    > Luke
    > Microsoft Online Support
    >
    > Get Secure! [url]www.microsoft.com/security[/url]
    > (This posting is provided "AS IS", with no warranties, and confers no
    > rights.)
    >

    CJM Guest

Posting Permissions

  • You may not post new threads
  • You may post replies
  • You may not post attachments
  • You may not edit your posts

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139