CDaoDatabase::Open() works on Win2KPro, not on Win98SE

C

Chris Chiesa

Years ago on Win98SE under VC++ 4.1 (or 4.2; I'm not quite sure) I wrote
a simple console application that uses CDaoDatabase to insert records
into a .mdb file created with MS Access 97. I've upgraded the
development machine to Win2kPro but everything else is the same: still
using the same version of VC++ and Access, and still ultimately
targeting a Win98SE machine for deployment. (Yes, I know those tools
are old. "Hobbyist" use alone tends to discourage the expense of
upgrading.)

My program works when built-and-run entirely on the Win2kPro development
machine. Likewise, it always worked when built-and-run entirely on the
development machine when it was running Win98SE. I'm not sure whether I
ever tried it on "another" Win98SE machine when my development machine
ran Win98SE. All I know now is that it DOESN'T run on the target
Win98SE machine, when built on the Win2kPro development machine.

I've narrowed the problem down to CDaoDatabase::Open(), which is neither
returning nor throwing either of the documented exceptions
(CDaoException or CMemoryException). The program takes neither the
"success/continue" path, nor the "exception/catch/return" path, coded in
my source; it is as though CDaoDatabase::Open() is exit()'ing from
somewhere within, without informing me of any reasons. I see no message
boxes, error messages, etc. other than the before-and-after debug-output
statements I myself placed around the call to Open().

I have tentatively concluded that there's something "environmental" to
blame: something is set "just so" in the machine(s) that have (had) VC++
on them, that ISN'T set correctly on the target machine. I don't know
whether it has to do with a disagreement between what VC++ finds and
uses "at compile/link time," or between the "run time" environments on
the two machines. I've scoured Google and found one or two articles
that seem to describe ALMOST the same problem, except that THOSE people
seem to at least be seeing error messages, which I am not.

The gist of the responses on Google seems to be "ensure that the
same/right version(s) of MS Jet and DAO are installed on the two
machines," but I have almost no idea whatsoever how to go about that.
The exact same version of MS Access (MS Office 97) is installed on both
the development and the target machines, just as was the case when both
were Win98SE. I HAVE managed to search out all DLLs whose names contain
'DAO' or 'Jet' (case-insensitive), on both machines. All the same DLLs
seem to be PRESENT on the two machines, although I have no idea whether
mere "presence" is sufficient to constitute "installation."

Perhaps significantly, the only thing that IS definitely installed on
the development machine but NOT on the target machine, is VC++ itself.
So I'm very vaguely guessing that the problem has something to do with a
component that gets installed ONLY with VC++ ... I see responses on
Google to the effect of, "install the distributable database support
components supplied with VC++," but I don't know how to do that -- if
it's even supported in as early a version as 4.1. I DON'T want to have
to install the entirety of VC++ on the Win98SE target machine.

Thanks in advance for any (very specific and detailed) light you can
shed. If you don't think the response will be of general interest, feel
free to e-mail.

Chris Chiesa
(e-mail address removed)
- remove 'nospam.' when replying via e-mail
 
B

Brendan Reynolds

JET is included in the OS in later versions of Windows, and many
applications will install their required version of JET if it is not
present, so yes, it is very possible that the two PCs have different
versions of JET and/or DAO.

You're on the right track when you mention installing the redistributable
database components supplied with VC++, but you'll likely need to ask the
question in a VC++ or Visual Studio newsgroup to get details on how to do
that.
 
C

Chris Chiesa

[posted and mailed]

JET is included in the OS in later versions of Windows, and many
applications will install their required version of JET if it is not
present, so yes, it is very possible that the two PCs have different
versions of JET and/or DAO.

Thanks for the info. This still leaves open the question of "how to
tell" what version(s) of JET and DAO are installed on a given machine,
given that (as mentioned originally) I see the SAME FILES on both. I
take it there might be two different versions of e.g. dao360.dll or
whatever? And that I need to "somehow" look INSIDE them to find their
version info? Can that be done with QuickView on 98SE? Is there an
equivalent tool on 2kPro (which here LACKS QuickView)?
You're on the right track when you mention installing the
redistributable database components supplied with VC++, but you'll
likely need to ask the question in a VC++ or Visual Studio newsgroup
to get details on how to do that.

Thanks again. I thought I WAS posting this to a VC++/VS specific
newsgroup -- microsoft.public.vc.database -- but it has somehow put
itself into microsoft.public.access. Ah well, I am using a new (to me)
newsreader which has lots of cryptic options that I can't make head or
tail of...

Chris
 
B

Brendan Reynolds

Can't remember Windows 98, but in Windows XP you can just right-click the
file and choose Properties.

I can't be sure about the older version of VC++ you seem to be using, but
certainly in any recent version of Visual Studio, the setup and deployment
tools will detect JET and DAO as dependencies and install the required
version on the target PC if it is not present.

--
Brendan Reynolds (MVP)

Chris Chiesa said:
[posted and mailed]

JET is included in the OS in later versions of Windows, and many
applications will install their required version of JET if it is not
present, so yes, it is very possible that the two PCs have different
versions of JET and/or DAO.

Thanks for the info. This still leaves open the question of "how to
tell" what version(s) of JET and DAO are installed on a given machine,
given that (as mentioned originally) I see the SAME FILES on both. I
take it there might be two different versions of e.g. dao360.dll or
whatever? And that I need to "somehow" look INSIDE them to find their
version info? Can that be done with QuickView on 98SE? Is there an
equivalent tool on 2kPro (which here LACKS QuickView)?
You're on the right track when you mention installing the
redistributable database components supplied with VC++, but you'll
likely need to ask the question in a VC++ or Visual Studio newsgroup
to get details on how to do that.

Thanks again. I thought I WAS posting this to a VC++/VS specific
newsgroup -- microsoft.public.vc.database -- but it has somehow put
itself into microsoft.public.access. Ah well, I am using a new (to me)
newsreader which has lots of cryptic options that I can't make head or
tail of...

Chris
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top