
Mystery: ADO connects to database but fields don't appear on some computers
Hello.
I have a simple program for displaying the contents of an Access
database that I created using the VB6 Data Form Wizard. It works
great on my computer and on another computer that I've tested.
However, on some computers it apparently connects to the database
because the program knows how many records are in the database table
but the fields appear blank when one goes through the various records.
All the information for each record is still in the database; it's
just not displaying in the text boxes on the form.
I know that certain versions of Windows don't support the newer ADO
versions so I set the reference for my program to the ADO 2.5 Library
as I was told this runs on Windows Me, 2000, and perhaps earlier
versions. My computer and another computer that the program runs fine
on are both using Windows XP Pro. Record information has failed to
appear on machines running both ME and XP, so it doesn't seem to be a
matter of having an old version of Windows. In the cases where
nothing shows up in the textboxes connected to the different database
fields, the program still knows how many records there are as it will
let you use the little arrows to move between records over the range
of records (1 to 79), but no more. This suggests to me that it has
connected to the database correctly but is just failing to display the
information in the textboxes where it is supposed to appear. I
haven't noticed any pattern yet as to what kinds of machines it will
or will not work on, although I've only tried it on a few machines.
Note that on my machine I have run it both through the VB6 environment
and as a stand-alone program after compiling it. On the other
computers (it will work on some and not on others) I have run it only
as a compiled program.
The code and form are essentially what the Data Form Wizard generated.
I did change the form layout to make it more readable and I added one
command button and subroutine to show the PDF file associated with a
record if one is available but that didn't necessitate changing the
code the Data Form Wizard generated.
Any ideas? Advice, suggestions, and/or diagnoses of the problem would
all be much appreciated.
Thanks very much.
Andrew