"As Database" object type in 97 Gone in XP

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

    "As Database" object type in 97 Gone in XP

    Hello,

    I'm having trouble converting code in Access XP / 2002. I have some code
    that declares an variable "as database" in Access 97, which is not
    recognized in Access XP. I've tried to find a refrence to the items that
    have changed between 97 and XP, and haven't been able to find anything yet.
    I will continue looking, but if anyone can shed some light on this fairly
    quickly, I would appreciate it.

    Thanks In Advance!

    RWC


  • RWC

    #2
    Re: "As Database" object type in 97 Gone in XP

    Thanks John,

    I had done that previously with another database as a short cut at the time,
    but I would like to rely soley on the XP dlls if I can.

    Thanks!
    RWC

    "John Rutherford" <jr1.rutherford @virgin.net> wrote in message
    news:1Vm6b.478$ NB6.426343@news fep1-win.server.ntli .net...[color=blue]
    > You might have to open the 97 database in Access XP then declare database
    > incode as a shortcut soloution.
    >
    > If not I am not sure where to find 97 vs XP differentals
    >
    > "RWC" <hemmingway@sha w.ca> wrote in message
    > news:FJm6b.1565 $Mg7.1457@pd7tw 1no...[color=green]
    > > Hello,
    > >
    > > I'm having trouble converting code in Access XP / 2002. I have some[/color][/color]
    code[color=blue][color=green]
    > > that declares an variable "as database" in Access 97, which is not
    > > recognized in Access XP. I've tried to find a refrence to the items[/color][/color]
    that[color=blue][color=green]
    > > have changed between 97 and XP, and haven't been able to find anything[/color]
    > yet.[color=green]
    > > I will continue looking, but if anyone can shed some light on this[/color][/color]
    fairly[color=blue][color=green]
    > > quickly, I would appreciate it.
    > >
    > > Thanks In Advance!
    > >
    > > RWC
    > >
    > >[/color]
    >
    >[/color]


    Comment

    • Peter Doering

      #3
      Re: &quot;As Database&quot; object type in 97 Gone in XP

      > I'm having trouble converting code in Access XP / 2002. I have some code[color=blue]
      > that declares an variable "as database" in Access 97, which is not
      > recognized in Access XP. I've tried to find a refrence to the items that
      > have changed between 97 and XP, and haven't been able to find anything yet.
      > I will continue looking, but if anyone can shed some light on this fairly
      > quickly, I would appreciate it.[/color]

      Check your references in XP (open any module, menu tools - references).
      These ones you should be there:
      - VBA
      - MS Access 10.0
      - MS DAO 3.6
      - ...

      Remove the check on any "not available"'s or set the correct reference.

      HTH - Peter

      --
      No mails please.
      This posting is provided AS IS with no warranties, and confers no rights.

      Comment

      • Allen Browne

        #4
        Re: &quot;As Database&quot; object type in 97 Gone in XP

        In Access 2002, open a code window, and choose References from the Tools
        menu.

        Check the box beside:
        Microsoft DAO 3.6 Library.

        Note that you may run into problems with Recordset objects as well. Details:
        How to identify and solve problems with VBA references in a Microsoft Access database. Includes a listing of the libraries needed for each version of Access.


        --
        Allen Browne - Microsoft MVP. Perth, Western Australia.
        Tips for Access users - http://allenbrowne.com/tips.html

        "RWC" <hemmingway@sha w.ca> wrote in message
        news:UZm6b.1576 $Mg7.97@pd7tw1n o...[color=blue]
        > Thanks John,
        >
        > I had done that previously with another database as a short cut at the[/color]
        time,[color=blue]
        > but I would like to rely soley on the XP dlls if I can.
        >
        > Thanks!
        > RWC
        >
        > "John Rutherford" <jr1.rutherford @virgin.net> wrote in message
        > news:1Vm6b.478$ NB6.426343@news fep1-win.server.ntli .net...[color=green]
        > > You might have to open the 97 database in Access XP then declare[/color][/color]
        database[color=blue][color=green]
        > > incode as a shortcut soloution.
        > >
        > > If not I am not sure where to find 97 vs XP differentals
        > >
        > > "RWC" <hemmingway@sha w.ca> wrote in message
        > > news:FJm6b.1565 $Mg7.1457@pd7tw 1no...[color=darkred]
        > > > Hello,
        > > >
        > > > I'm having trouble converting code in Access XP / 2002. I have some[/color][/color]
        > code[color=green][color=darkred]
        > > > that declares an variable "as database" in Access 97, which is not
        > > > recognized in Access XP. I've tried to find a refrence to the items[/color][/color]
        > that[color=green][color=darkred]
        > > > have changed between 97 and XP, and haven't been able to find anything[/color]
        > > yet.[color=darkred]
        > > > I will continue looking, but if anyone can shed some light on this[/color][/color]
        > fairly[color=green][color=darkred]
        > > > quickly, I would appreciate it.
        > > >
        > > > Thanks In Advance!
        > > >
        > > > RWC
        > > >
        > > >[/color]
        > >
        > >[/color]
        >
        >[/color]


        Comment

        • RWC

          #5
          Re: &quot;As Database&quot; object type in 97 Gone in XP

          Thanks Peter, But I'd like to find a solution that does not include the
          older files.


          "Peter Doering" <news@doering.o rg> wrote in message
          news:bjcugp$hsk 14$1@ID-204768.news.uni-berlin.de...[color=blue][color=green]
          > > I'm having trouble converting code in Access XP / 2002. I have some[/color][/color]
          code[color=blue][color=green]
          > > that declares an variable "as database" in Access 97, which is not
          > > recognized in Access XP. I've tried to find a refrence to the items[/color][/color]
          that[color=blue][color=green]
          > > have changed between 97 and XP, and haven't been able to find anything[/color][/color]
          yet.[color=blue][color=green]
          > > I will continue looking, but if anyone can shed some light on this[/color][/color]
          fairly[color=blue][color=green]
          > > quickly, I would appreciate it.[/color]
          >
          > Check your references in XP (open any module, menu tools - references).
          > These ones you should be there:
          > - VBA
          > - MS Access 10.0
          > - MS DAO 3.6
          > - ...
          >
          > Remove the check on any "not available"'s or set the correct reference.
          >
          > HTH - Peter
          >
          > --
          > No mails please.
          > This posting is provided AS IS with no warranties, and confers no rights.[/color]


          Comment

          • Allen Browne

            #6
            Re: &quot;As Database&quot; object type in 97 Gone in XP

            You can do that if you want, but IMHO it's a great deal of unnecessary work
            for a step backwards.

            DAO is the native Access library. If your tables are Access tables, then DAO
            is the best library to work with. In some cases it is the *only* way to set
            properties. Access 2003 will again give you a reference to DAO by default,
            so it is not a retrograde step to use this library.

            --
            Allen Browne - Microsoft MVP. Perth, Western Australia.
            Tips for Access users - http://allenbrowne.com/tips.html

            "RWC" <hemmingway@sha w.ca> wrote in message
            news:Trn6b.7793 $Fe6.5470@pd7tw 2no...[color=blue]
            > Thanks Allen, I'd like to recode without using references to older dlls if[/color]
            I[color=blue]
            > can.
            >
            >
            > "Allen Browne" <abrowne1_SpamT rap@bigpond.net .au> wrote in message
            > news:S5n6b.8627 5$bo1.11980@new s-server.bigpond. net.au...[color=green]
            > > In Access 2002, open a code window, and choose References from the Tools
            > > menu.
            > >
            > > Check the box beside:
            > > Microsoft DAO 3.6 Library.
            > >
            > > Note that you may run into problems with Recordset objects as well.[/color]
            > Details:[color=green]
            > > http://allenbrowne.com/ser-38.html
            > >
            > > --
            > > Allen Browne - Microsoft MVP. Perth, Western Australia.
            > > Tips for Access users - http://allenbrowne.com/tips.html
            > >
            > > "RWC" <hemmingway@sha w.ca> wrote in message
            > > news:UZm6b.1576 $Mg7.97@pd7tw1n o...[color=darkred]
            > > > Thanks John,
            > > >
            > > > I had done that previously with another database as a short cut at the[/color]
            > > time,[color=darkred]
            > > > but I would like to rely soley on the XP dlls if I can.
            > > >
            > > > Thanks!
            > > > RWC
            > > >
            > > > "John Rutherford" <jr1.rutherford @virgin.net> wrote in message
            > > > news:1Vm6b.478$ NB6.426343@news fep1-win.server.ntli .net...
            > > > > You might have to open the 97 database in Access XP then declare[/color]
            > > database[color=darkred]
            > > > > incode as a shortcut soloution.
            > > > >
            > > > > If not I am not sure where to find 97 vs XP differentals
            > > > >
            > > > > "RWC" <hemmingway@sha w.ca> wrote in message
            > > > > news:FJm6b.1565 $Mg7.1457@pd7tw 1no...
            > > > > > Hello,
            > > > > >
            > > > > > I'm having trouble converting code in Access XP / 2002. I have[/color][/color][/color]
            some[color=blue][color=green][color=darkred]
            > > > code
            > > > > > that declares an variable "as database" in Access 97, which is not
            > > > > > recognized in Access XP. I've tried to find a refrence to the[/color][/color][/color]
            items[color=blue][color=green][color=darkred]
            > > > that
            > > > > > have changed between 97 and XP, and haven't been able to find[/color][/color]
            > anything[color=green][color=darkred]
            > > > > yet.
            > > > > > I will continue looking, but if anyone can shed some light on this
            > > > fairly
            > > > > > quickly, I would appreciate it.
            > > > > >
            > > > > > Thanks In Advance!
            > > > > >
            > > > > > RWC
            > > > > >
            > > > > >
            > > > >
            > > > >
            > > >
            > > >[/color]
            > >
            > >[/color]
            >
            >[/color]


            Comment

            • Lyle Fairfield

              #7
              Re: &quot;As Database&quot; object type in 97 Gone in XP

              "RWC" <hemmingway@sha w.ca> wrote in message news:<FJm6b.156 5$Mg7.1457@pd7t w1no>...
              [color=blue]
              > I'm having trouble converting code in Access XP / 2002. I have some code
              > that declares an variable "as database" in Access 97, which is not
              > recognized in Access XP. I've tried to find a refrence to the items that
              > have changed between 97 and XP, and haven't been able to find anything yet.
              > I will continue looking, but if anyone can shed some light on this fairly
              > quickly, I would appreciate it.[/color]

              If you post the code, it's quite likely that someone who uses ACXP
              extensively will be able to suggest a simple solution. ACXP can use
              ADO and CurrentProject to simplify and enhance methods that were quite
              laborious in the once advanced but now archaic AC97. ADO also provides
              new, powerful methods.

              Comment

              • Larry  Linson

                #8
                Re: &quot;As Database&quot; object type in 97 Gone in XP

                "Lyle Fairfield" wrote
                [color=blue]
                > ACXP can use ADO and Current-
                > Project to simplify and enhance methods
                > that were quite laborious in the once
                > advanced but now archaic AC97. ADO
                > also provides new, powerful methods.[/color]

                You might as well give up trying to pick a fight, Lyle. If _I_ don't want to
                argue with you about this, it's unlikely that anyone does.

                Have a nice day.


                Comment

                • Iago Gallego

                  #9
                  Re: &quot;As Database&quot; object type in 97 Gone in XP

                  Allen,
                  Would you care to flesh out this statement? Are they dumping ADO?
                  How would that affect ADO.NET? I ask as I have apps in Acc97 which I
                  will need to transfer to Acc2kx soonish. They use DAO, and I would
                  much rather stay that way for simplicity's sake. However, I also have
                  a newer app in progress and it is a VB.NET beast. For that I'm using
                  ADO.NET. Should I prepare for DAO.NET?

                  Martin


                  "Allen Browne" <abrowne1_SpamT rap@bigpond.net .au> wrote in message news:<4Fn6b.862 88$bo1.39925@ne ws-server.bigpond. net.au>...[color=blue]
                  > You can do that if you want, but IMHO it's a great deal of unnecessary work
                  > for a step backwards.
                  >
                  > DAO is the native Access library. If your tables are Access tables, then DAO
                  > is the best library to work with. In some cases it is the *only* way to set
                  > properties. Access 2003 will again give you a reference to DAO by default,
                  > so it is not a retrograde step to use this library.
                  >
                  > --
                  > Allen Browne - Microsoft MVP. Perth, Western Australia.
                  > Tips for Access users - http://allenbrowne.com/tips.html
                  >[/color]
                  [color=blue]
                  > "RWC" <hemmingway@sha w.ca> wrote in message
                  > news:Trn6b.7793 $Fe6.5470@pd7tw 2no...[color=green]
                  > > Thanks Allen, I'd like to recode without using references to older dlls if[/color]
                  > I[color=green]
                  > > can.
                  > >
                  > >
                  > > "Allen Browne" <abrowne1_SpamT rap@bigpond.net .au> wrote in message
                  > > news:S5n6b.8627 5$bo1.11980@new s-server.bigpond. net.au...[color=darkred]
                  > > > In Access 2002, open a code window, and choose References from the Tools
                  > > > menu.
                  > > >
                  > > > Check the box beside:
                  > > > Microsoft DAO 3.6 Library.
                  > > >
                  > > > Note that you may run into problems with Recordset objects as well.[/color][/color]
                  > Details:[color=green][color=darkred]
                  > > > http://allenbrowne.com/ser-38.html
                  > > >
                  > > > --
                  > > > Allen Browne - Microsoft MVP. Perth, Western Australia.
                  > > > Tips for Access users - http://allenbrowne.com/tips.html[/color][/color][/color]

                  Comment

                  • Lyle Fairfield

                    #10
                    Re: &quot;As Database&quot; object type in 97 Gone in XP

                    Martin.Hungerfo rd@dsto.defence .gov.au (Iago Gallego) wrote in
                    news:a56d6c97.0 309072029.46fb8 b33@posting.goo gle.com:
                    [color=blue]
                    > Allen,
                    > Would you care to flesh out this statement? Are they dumping ADO?
                    > How would that affect ADO.NET? I ask as I have apps in Acc97 which I
                    > will need to transfer to Acc2kx soonish. They use DAO, and I would
                    > much rather stay that way for simplicity's sake. However, I also have
                    > a newer app in progress and it is a VB.NET beast. For that I'm using
                    > ADO.NET. Should I prepare for DAO.NET?[/color]

                    DAO.Net is actually "DOA"!

                    --
                    Lyle

                    Comment

                    • David W. Fenton

                      #11
                      Re: &quot;As Database&quot; object type in 97 Gone in XP

                      abrowne1_SpamTr ap@bigpond.net. au (Allen Browne) wrote in
                      <MaU6b.88612$bo 1.34110@news-server.bigpond. net.au>:
                      [color=blue]
                      >DAO is the native library that was designed for Access, and
                      >generally exposes the functionaly within Access/JET best and most
                      >efficiently. If the final release of Access 2003 contains the
                      >reference to the DAO library (as the beta did), it will simplify
                      >the task of conversion to the new version. . . .[/color]

                      Is it not the case that *conversion* from A97 to A2K/A2K2 retains
                      the reference to DAO? It is only when you create a fresh A2K/A2K2
                      database and import the objects from the A97 database that you
                      don't automatically get the DAO reference.

                      I wouldn't exactly call that "converting ," which is why I've always
                      been puzzled why so many people encounter the error -- instead of
                      using the built-in conversion functionality, they create a new MDB
                      and then run into the problem.

                      []
                      [color=blue]
                      >With JET tables, I use ADO/ADOX only for the new features, such as
                      >Decimal fields and cascade-to-null relations. MS has not updated
                      >DAO to include this functionality.[/color]

                      Is this a feature of Jet 4? I didn't realize it was there. It's a
                      useful one, especially for those cases where a foreign key can be
                      Null or limited to a PK from another table (CompanyID for a
                      person's employer, for example).

                      But other than the User Roster, is there anything that ADO offers
                      with Jet that DAO does not that is outside the scope of table
                      creation/restructuring (i.e., decimal type and cascade to Null are
                      both useful only at the time you are designing a schema)? Put
                      another way, other than User Roster, what reason would there be to
                      use ADO in a Jet application, as opposed to during development?

                      --
                      David W. Fenton http://www.bway.net/~dfenton
                      dfenton at bway dot net http://www.bway.net/~dfassoc

                      Comment

                      • Allen Browne

                        #12
                        Re: &quot;As Database&quot; object type in 97 Gone in XP

                        Embedded.

                        "David W. Fenton" <dXXXfenton@bwa y.net> wrote in message
                        news:93F099B70d fentonbwaynet@2 4.168.128.90...[color=blue]
                        > abrowne1_SpamTr ap@bigpond.net. au (Allen Browne) wrote in
                        > <MaU6b.88612$bo 1.34110@news-server.bigpond. net.au>:
                        >[color=green]
                        > >DAO is the native library that was designed for Access, and
                        > >generally exposes the functionaly within Access/JET best and most
                        > >efficiently. If the final release of Access 2003 contains the
                        > >reference to the DAO library (as the beta did), it will simplify
                        > >the task of conversion to the new version. . . .[/color]
                        >
                        > Is it not the case that *conversion* from A97 to A2K/A2K2 retains
                        > the reference to DAO? It is only when you create a fresh A2K/A2K2
                        > database and import the objects from the A97 database that you
                        > don't automatically get the DAO reference.
                        >
                        > I wouldn't exactly call that "converting ," which is why I've always
                        > been puzzled why so many people encounter the error -- instead of
                        > using the built-in conversion functionality, they create a new MDB
                        > and then run into the problem.[/color]

                        Yes, the actual process of conversion to A2000 or A2002 retains the DAO
                        reference (or more specifically replaces DAO 3.5x with the DAO 3.6 library
                        references). I'm not sure whether people prefer to import: I certainly do,
                        because I won't let an A2000 or later database anywhere near an object until
                        I have disabled the "Name AutoCorrect" option.

                        Where the real problem comes is when users try to copy code - from one of
                        our books or websites. After posting this last night, I took note, and
                        answered 3 questions in the n.g.s relating to references.

                        [color=blue][color=green]
                        > >With JET tables, I use ADO/ADOX only for the new features, such as
                        > >Decimal fields and cascade-to-null relations. MS has not updated
                        > >DAO to include this functionality.[/color]
                        >
                        > Is this a feature of Jet 4? I didn't realize it was there. It's a
                        > useful one, especially for those cases where a foreign key can be
                        > Null or limited to a PK from another table (CompanyID for a
                        > person's employer, for example).[/color]

                        Yes, JET 4 supports cascade-to-null. It sounds like it could be useful, but
                        I have not yet used it in a production database. 90% of foreign keys should
                        be marked "Required" of course. For the remaining 10%, it represents a loss
                        of data, and when I'm developing I tend to think in terms of minimizing and
                        respecting the time of the data entry operators, so I find it tough to just
                        allow their hard work to go down the tubes. :-)

                        There have been times when I have nullified a field in a transaction, so I
                        will probably use it one day, but IME it's not as useful as it sounds like
                        it could be.
                        [color=blue]
                        > But other than the User Roster, is there anything that ADO offers
                        > with Jet that DAO does not that is outside the scope of table
                        > creation/restructuring (i.e., decimal type and cascade to Null are
                        > both useful only at the time you are designing a schema)? Put
                        > another way, other than User Roster, what reason would there be to
                        > use ADO in a Jet application, as opposed to during development?[/color]

                        Again, I haven't found much ADO stuff that I consider really useful. The
                        Decimal field type is also something I haven't used in production. It's
                        inefficient (96-bit), incompletely implemented (no matching type in VBA, so
                        you can't define a constant of this type), and best reserved for cases where
                        the scaling beyond 4 places (Currency) is absolutely essential.

                        So, for applications where Access is both the front end and the back end,
                        DAO is the native library, and we know its limiations, bugs, and
                        workarounds. I consider that experience we have built up and shared together
                        via these newsgroups to be a significant reason not to move away from DAO.


                        Comment

                        Working...