Library References

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Keith

    Library References

    A2000 SP-3. Win XP Pro.

    I've inherited an A2k database which references both DAO and ADO
    libraries. I'm a bit of a newbie with libraries and so-on so my question
    is, can the two libraries be selected and co-exist in the same project?

    The app certainly compiles OK and I don't think it would be a quick job
    to convert to one library or the other. For info, if I de-select either
    I get loads of compilation errors.

    Many thanks.
    Keith.
  • Brian

    #2
    Re: Library References


    "Keith" <keith@NOCARPke ithwilby.org.uk > wrote in message
    news:cjm3aq$b4v $1@hercules.bti nternet.com...[color=blue]
    > A2000 SP-3. Win XP Pro.
    >
    > I've inherited an A2k database which references both DAO and ADO
    > libraries. I'm a bit of a newbie with libraries and so-on so my question
    > is, can the two libraries be selected and co-exist in the same project?
    >
    > The app certainly compiles OK and I don't think it would be a quick job
    > to convert to one library or the other. For info, if I de-select either
    > I get loads of compilation errors.
    >
    > Many thanks.
    > Keith.[/color]

    Yes, they can co-exist, not that I would recommend it. Sounds like a recipe
    for mucho confusion. If both libraries are referenced, then where object
    declarations could be ambiguous, they must be qualified e.g.

    Dim rs As DAO.Recordset

    In fact, for the sake of clarity, I always qualify declarations of all
    DAO/ADO objects.


    Comment

    • Douglas J. Steele

      #3
      Re: Library References

      "Brian" <bcap@IHATESPAM clara.co.uk> wrote in message
      news:1096717069 .24154.0@damia. uk.clara.net...[color=blue]
      >
      > "Keith" <keith@NOCARPke ithwilby.org.uk > wrote in message
      > news:cjm3aq$b4v $1@hercules.bti nternet.com...[color=green]
      > > A2000 SP-3. Win XP Pro.
      > >
      > > I've inherited an A2k database which references both DAO and ADO
      > > libraries. I'm a bit of a newbie with libraries and so-on so my question
      > > is, can the two libraries be selected and co-exist in the same project?
      > >
      > > The app certainly compiles OK and I don't think it would be a quick job
      > > to convert to one library or the other. For info, if I de-select either
      > > I get loads of compilation errors.
      > >
      > > Many thanks.
      > > Keith.[/color]
      >
      > Yes, they can co-exist, not that I would recommend it. Sounds like a[/color]
      recipe[color=blue]
      > for mucho confusion. If both libraries are referenced, then where object
      > declarations could be ambiguous, they must be qualified e.g.
      >
      > Dim rs As DAO.Recordset
      >
      > In fact, for the sake of clarity, I always qualify declarations of all
      > DAO/ADO objects.[/color]

      There's nothing wrong with having both references. I do it a lot: DAO for
      queries against Access tables and ADO for queries against SQL Server.

      I agree with your advice about always qualifying the declarations. I do this
      even when I only have a DAO reference set.

      For the record, the list of objects with the same names in the 2 models is
      Connection, Error, Errors, Field, Fields, Parameter, Parameters, Property,
      Properties and Recordset


      --
      Doug Steele, Microsoft Access MVP

      (no e-mails, please!)





      Comment

      • Brian

        #4
        Re: Library References

        "Douglas J. Steele" <NOSPAM_djsteel e@NOSPAM_canada .com> wrote in message
        news:KYKdnQpwy9 d7LMPcRVn-sg@rogers.com.. .[color=blue]
        >
        > There's nothing wrong with having both references. I do it a lot: DAO for
        > queries against Access tables and ADO for queries against SQL Server.
        >[/color]

        Call me a Luddite if you will, but I almost exclusively use DAO against SQL
        Server as well.


        Comment

        • Keith

          #5
          Re: Library References

          Brian wrote:[color=blue]
          > "Keith" <keith@NOCARPke ithwilby.org.uk > wrote in message
          > news:cjm3aq$b4v $1@hercules.bti nternet.com...
          >[color=green]
          >>A2000 SP-3. Win XP Pro.
          >>
          >>I've inherited an A2k database which references both DAO and ADO
          >>libraries. I'm a bit of a newbie with libraries and so-on so my question
          >>is, can the two libraries be selected and co-exist in the same project?
          >>
          >>The app certainly compiles OK and I don't think it would be a quick job
          >>to convert to one library or the other. For info, if I de-select either
          >>I get loads of compilation errors.
          >>
          >>Many thanks.
          >>Keith.[/color]
          >
          >
          > Yes, they can co-exist, not that I would recommend it. Sounds like a recipe
          > for mucho confusion. If both libraries are referenced, then where object
          > declarations could be ambiguous, they must be qualified e.g.
          >
          > Dim rs As DAO.Recordset
          >
          > In fact, for the sake of clarity, I always qualify declarations of all
          > DAO/ADO objects.
          >
          >[/color]
          Thanks Brian. I have been doing just that but I just wanted a little
          extra confidence that what I was doing was right. Oh the joys of working
          with someone else's stuff ;-)

          Regards,
          Keith.

          Comment

          • Keith

            #6
            Re: Library References

            Douglas J. Steele wrote:
            <snip>[color=blue]
            > For the record, the list of objects with the same names in the 2 models is
            > Connection, Error, Errors, Field, Fields, Parameter, Parameters, Property,
            > Properties and Recordset
            >
            >[/color]
            Thanks for the info. Is there special consideration to be observed when
            handling the common objects?

            Comment

            • Douglas J. Steele

              #7
              Re: Library References

              "Keith" <keith@NOCARPke ithwilby.org.uk > wrote in message
              news:cjmff1$7gf $1@hercules.bti nternet.com...[color=blue]
              > Douglas J. Steele wrote:
              > <snip>[color=green]
              > > For the record, the list of objects with the same names in the 2 models[/color][/color]
              is[color=blue][color=green]
              > > Connection, Error, Errors, Field, Fields, Parameter, Parameters,[/color][/color]
              Property,[color=blue][color=green]
              > > Properties and Recordset
              > >
              > >[/color]
              > Thanks for the info. Is there special consideration to be observed when
              > handling the common objects?[/color]

              As long as you ensure you declare as DAO.xxx or ADODB.xxx, you should have
              no problem.

              If you don't disambiguate like that, you'll get which reference appears
              higher in the list of references, which may not be what you want.

              --
              Doug Steele, Microsoft Access MVP

              (no e-mails, please!)





              Comment

              • Darryl Kerkeslager

                #8
                Re: Library References

                Luddite


                "Brian" <bcap@IHATESPAM clara.co.uk> wrote:[color=blue]
                >
                > Call me a Luddite if you will, but I almost exclusively use DAO against[/color]
                SQL[color=blue]
                > Server as well.[/color]


                Comment

                • Steve Jorgensen

                  #9
                  Re: Library References

                  In Access, you almost have to use DAO for some things, and it's fine, even
                  excellent for working with either native JET tables, or links to servers. On
                  the other hand, I'm always coming up with compelling needs for ADO features
                  like batch optimistic recordsets, saving recordsets to files, and using
                  fabricated ADO recordsets for things that have nothing directly to do with
                  databases at all.

                  That means almost every Access project I work on has references to both DAO
                  and ADO. It's normal, and it's fine.

                  On Sat, 2 Oct 2004 11:27:22 +0000 (UTC), Keith <keith@NOCARPke ithwilby.org.uk >
                  wrote:
                  [color=blue]
                  >A2000 SP-3. Win XP Pro.
                  >
                  >I've inherited an A2k database which references both DAO and ADO
                  >libraries. I'm a bit of a newbie with libraries and so-on so my question
                  >is, can the two libraries be selected and co-exist in the same project?
                  >
                  >The app certainly compiles OK and I don't think it would be a quick job
                  >to convert to one library or the other. For info, if I de-select either
                  >I get loads of compilation errors.
                  >
                  >Many thanks.
                  >Keith.[/color]

                  Comment

                  • Brian

                    #10
                    Re: Library References

                    "Darryl Kerkeslager" <Kerkeslager@co mcast.net> wrote in message
                    news:ffOdnW1g4K U0acPcRVn-ig@comcast.com. ..[color=blue]
                    > Luddite
                    >
                    >
                    > "Brian" <bcap@IHATESPAM clara.co.uk> wrote:[color=green]
                    > >
                    > > Call me a Luddite if you will, but I almost exclusively use DAO against[/color]
                    > SQL[color=green]
                    > > Server as well.[/color]
                    >
                    >[/color]

                    LOL!


                    Comment

                    • Keith

                      #11
                      Re: Library References

                      Many thanks Steve.

                      Steve Jorgensen wrote:[color=blue]
                      > In Access, you almost have to use DAO for some things, and it's fine, even
                      > excellent for working with either native JET tables, or links to servers. On
                      > the other hand, I'm always coming up with compelling needs for ADO features
                      > like batch optimistic recordsets, saving recordsets to files, and using
                      > fabricated ADO recordsets for things that have nothing directly to do with
                      > databases at all.
                      >
                      > That means almost every Access project I work on has references to both DAO
                      > and ADO. It's normal, and it's fine.
                      >
                      > On Sat, 2 Oct 2004 11:27:22 +0000 (UTC), Keith <keith@NOCARPke ithwilby.org.uk >
                      > wrote:
                      >
                      >[color=green]
                      >>A2000 SP-3. Win XP Pro.
                      >>
                      >>I've inherited an A2k database which references both DAO and ADO
                      >>libraries. I'm a bit of a newbie with libraries and so-on so my question
                      >>is, can the two libraries be selected and co-exist in the same project?
                      >>
                      >>The app certainly compiles OK and I don't think it would be a quick job
                      >>to convert to one library or the other. For info, if I de-select either
                      >>I get loads of compilation errors.
                      >>
                      >>Many thanks.
                      >>Keith.[/color]
                      >
                      >[/color]

                      Comment

                      Working...