473,503 Members | 1,783 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

"As Database" object type in 97 Gone in XP

RWC
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
Nov 12 '05 #1
11 3635
RWC
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" <jr************@virgin.net> wrote in message
news:1V******************@newsfep1-win.server.ntli.net...
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" <he********@shaw.ca> wrote in message
news:FJm6b.1565$Mg7.1457@pd7tw1no...
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


Nov 12 '05 #2
> 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.


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.
Nov 12 '05 #3
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:
http://allenbrowne.com/ser-38.html

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

"RWC" <he********@shaw.ca> wrote in message
news:UZm6b.1576$Mg7.97@pd7tw1no...
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" <jr************@virgin.net> wrote in message
news:1V******************@newsfep1-win.server.ntli.net...
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" <he********@shaw.ca> wrote in message
news:FJm6b.1565$Mg7.1457@pd7tw1no...
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



Nov 12 '05 #4
RWC
Thanks Peter, But I'd like to find a solution that does not include the
older files.
"Peter Doering" <ne**@doering.org> wrote in message
news:bj************@ID-204768.news.uni-berlin.de...
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.


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.

Nov 12 '05 #5
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" <he********@shaw.ca> wrote in message
news:Trn6b.7793$Fe6.5470@pd7tw2no...
Thanks Allen, I'd like to recode without using references to older dlls if I can.
"Allen Browne" <ab***************@bigpond.net.au> wrote in message
news:S5*******************@news-server.bigpond.net.au...
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:
http://allenbrowne.com/ser-38.html

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

"RWC" <he********@shaw.ca> wrote in message
news:UZm6b.1576$Mg7.97@pd7tw1no...
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" <jr************@virgin.net> wrote in message
news:1V******************@newsfep1-win.server.ntli.net...
> 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" <he********@shaw.ca> wrote in message
> news:FJm6b.1565$Mg7.1457@pd7tw1no...
> > 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
> >
> >
>
>



Nov 12 '05 #6
"RWC" <he********@shaw.ca> wrote in message news:<FJm6b.1565$Mg7.1457@pd7tw1no>...
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.


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.
Nov 12 '05 #7
"Lyle Fairfield" wrote
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.


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.
Nov 12 '05 #8
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" <ab***************@bigpond.net.au> wrote in message news:<4F*******************@news-server.bigpond.net.au>...
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" <he********@shaw.ca> wrote in message
news:Trn6b.7793$Fe6.5470@pd7tw2no...
Thanks Allen, I'd like to recode without using references to older dlls if

I
can.
"Allen Browne" <ab***************@bigpond.net.au> wrote in message
news:S5*******************@news-server.bigpond.net.au...
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: http://allenbrowne.com/ser-38.html

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

Nov 12 '05 #9
Ma***************@dsto.defence.gov.au (Iago Gallego) wrote in
news:a5**************************@posting.google.c om:
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?


DAO.Net is actually "DOA"!

--
Lyle

Nov 12 '05 #10
ab***************@bigpond.net.au (Allen Browne) wrote in
<Ma*******************@news-server.bigpond.net.au>:
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. . . .
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.

[]
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.


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
Nov 12 '05 #11
Embedded.

"David W. Fenton" <dX********@bway.net> wrote in message
news:93*********************@24.168.128.90...
ab***************@bigpond.net.au (Allen Browne) wrote in
<Ma*******************@news-server.bigpond.net.au>:
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. . . .
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.


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.

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.


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).


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


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.
Nov 12 '05 #12

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

22
3292
by: Dr Duck | last post by:
GDay all, Something seems odd to me.... I wrote a simple C# function public void bind(ref object a, ref object b, bool atob) { if(atob) b = a; else
4
21532
by: Monte | last post by:
It compiles fine in one of my ms2002 databases, but on another db (I inherited from somebody else), I get this compile error: "User-defined type not defined" Is something turned off in this...
3
11895
by: John | last post by:
Is there a way to code the button that's available in the query window--microsoft excel icon that exports to excel. I know transferspreadsheet will do this---but I want the query, which is in a...
72
4124
by: Paminu | last post by:
In math this expression: (a < b) && (b < c) would be described as: a < b < c But why is it that in C these two expressions evaluate to something different for the same values of a, b and...
3
1891
by: Maurice Walmsley | last post by:
I'll avoid tell you how lame I am and get straight to the question... I need a good expanation to the "ByVal sender As Object, ByVal e As System.EventArgs" part of; Public Sub...
5
9641
by: Hayato Iriumi | last post by:
When converting a type to another using CType and if the type conversion fails, it throw an exception. However, in C#, there is a keyword "as" which only makes the variable Nothing (null) without...
1
1498
by: Jav | last post by:
Asp.Net 2.0 When I drag a Multiview control from the ToolBox onto a WebPartZone, The MultiView displays a title of Untitled immediately above the Multiview title bar. When I show the form in the...
5
2764
by: gflor16 | last post by:
Problem: I have this code to run a word counter. But I have a problem when I hit the enter key, it doesn't give me any output of how many chars or words. ''' <summary> ''' Returns Word...
1
2228
by: chrisli | last post by:
Hello, i'm trying to make an Application which can get every Calendar entry from a FOREIGN User in Outlook on a Exchange 2003 Server. At the moment i can only get my own calender entries. But...
0
7086
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7280
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
1
6991
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
7460
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
5578
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
5014
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
3167
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
1512
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
0
380
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.