Solved

DAO/ISAM/Access problem ...

Posted on 2002-07-02
8
598 Views
Last Modified: 2013-12-25
I am using the, standard, data control in a VB6 project.
(with DAO 3.6 and an Access 2000 database)

Project installed and used succesfully on several computers.

On other computers i receive the error :
"Class not registered:
Looking for object with CLSID:{ 00000010-0000-0010-8000-00AA006D2EA4}"


When does the problem occur? :
Starting the application is no problem, it accesses the database correctly to load messages, form details , ...
The error messages pops up when i try to open a form which contains the data control. Debugging the code shows that everything is fine up and until the refresh method of the data control. Removing the refresh method of the data control moves the error message to the refresh method of the dbcombobox (which uses the data control). Removing the refresh method of the dbcombobox moves the error to the point where i use the boundtext method of the dbcombobox.

Example code :
Private Sub Form_Load()

  'Laden van de form
 
  'Instellen van de dataobject
  With Me.datLanguage
    .Connect = "Access 2000;"
    .DatabaseName = s_Budget_DB
    .RecordSource = "Select * From Language " & _
                    "Order By [Language];"
    .Refresh
  End With
  Me.dbComboLanguage.Refresh

  'Instellen op de huidig geselecteerde taal
  Me.dbComboLanguage.BoundText = l_Budget_Language

  'Instellen van de form grootte
  Me.Width = Screen.Width * 0.2
  Me.Height = Screen.Height * 0.2
 
End Sub



Checked the Microsoft Web site for solution (without success):
- Q233002 redistribute DAO 3.6
- Q213846 Deploy Database Applications with the Package and Deployment Wizard (PDW)
- Q240377 Ensure Jet 3.5 Is Installed Correctly
- Q209805 ACC2000: "Could Not Find Installable ISAM" Error Message
and some others ...


If i install and register DAO350.dll i get the error "Error 3170 Couldn't find installable ISAM"!

Also installed (without results) MDAC 2.5 SP2 and DCOM98 (as some of the problem machines are running Win98), MS Office 2K SP2


Any more ideas???

Thanks in advance

0
Comment
Question by:X14h
  • 3
  • 2
  • 2
  • +1
8 Comments
 
LVL 43

Accepted Solution

by:
TimCottee earned 100 total points
ID: 7124642
That class is the DBEngine 3.5 object (checked my registry). I would assume that somehow Jet is not properly installed (even though you may have done as suggested in the KB article). Have you tried installing the Jet Runtime from http://www.microsoft.com/data/download_Jet4SP3.htm
0
 

Author Comment

by:X14h
ID: 7126422

installed Jet 4 SP3 ... problem stays the same.

installing the DAO350.dll (includes the dbengine 3.5 object) results in the error "Error 3170 Couldn't find installable ISAM"!

regards
0
 
LVL 18

Expert Comment

by:mdougan
ID: 7127671
It's a guess, but whenever you get the installable ISAMS message, it usually means that it can't find the proper driver to establish the connection.

With a connect string of simply "Access 2000", it's not clear to me whether DAO will try to use the ODBC driver for Access 2000 or connect to the Jet engine directly.

The first thing I would check, is that I'd open up the ODBC DataSource Administrator, click on Drivers and verify that the affected machines all have Access 2000 listed in the list of drivers.  Double-check against computers that are working correctly to see if the Access 2000 ODBC driver has been installed.

Whenever I'm debugging database connection problems, I try to verify that I have connectivity outside of my application's code first.  Then, if I do, I know that it's my code that is the problem.

You might try opening up another Access database on the affected machine through the Microsoft Access user interface.  Select File|Get External Data|Import, then step through the screens to connect to another access database and see if you can import a couple of tables.  If you are able to do this, then you should have all the drivers necessary to connect to an Access database through a VB program.

Another thing you can try is to create an ODBC Data Source through the ODBCAdmin application pointing to your access database, and then try changing your connect string to something like:

.Connect = "ODBC;DSN=MYDSN;database=my.mdb"

If you are running on a mix of machines, I'd question if all of them are running Access 2000.  If not, they probably wont have the Access 2000 driver that you are referencing in your connect statement.
0
 

Author Comment

by:X14h
ID: 7129967

machines are running Access 2000 ...
i'm able to connect to another access database from within an access database and import table, query, ... objects

your comments about the connect string brought me to look up the connect string in the DAO help ... eventually found a possibility, setting the recordset object of the data control directly (instead of using the connect, databasename and recordsource properties) :

Private Sub Form_Load()

  'Laden van de form
  Dim db As DAO.Database
  Dim rs As DAO.Recordset
 
  Set db = DAO.OpenDatabase(s_Budget_DB)
  Set rs = db.OpenRecordset("Select * From Language " & _
                            "Order By [Language];", &_
                            dbOpenDynaset)
 
  'Instellen van de dataobject
  With Me.datLanguage

    '  NEW CODE BEGIN
    Set .Recordset = rs
    '  NEW CODE END

    '  OLD CODE BEGIN
    '.Connect = "Access 2000;"
    '.DatabaseName = s_Budget_DB
    '.RecordSource = "Select * From Language " & _
    '                "Order By [Language];"
    '  OLD CODE END

    .Refresh
  End With
  Me.dbComboLanguage.Refresh

  'Instellen op de huidig geselecteerde taal
  Me.dbComboLanguage.BoundText = l_Budget_Language

  'Instellen van de form grootte
  Me.Width = Screen.Width * 0.2
  Me.Height = Screen.Height * 0.2
 
End Sub


... and it works !

now why is that ?
0
What Should I Do With This Threat Intelligence?

Are you wondering if you actually need threat intelligence? The answer is yes. We explain the basics for creating useful threat intelligence.

 

Author Comment

by:X14h
ID: 7131414
been doing some more testing ...
following code also works:

 Dim db As DAO.Database
 
 Set db = DAO.OpenDatabase(s_Budget_DB)
 
 'Instellen van de dataobject
 With Me.datLanguage

   'Opening the recordset to a default
   Set .Recordset = db.OpenRecordSet("Language",dbopendynaset)

   'Altering the sql statement to what i want it to do
   .RecordSource = "Select * From Language " & _
                   "Order By [Language];"

   .Refresh
 End With
 Me.dbComboLanguage.Refresh


so the only thing i have to change in code is connecting
the .recordset of the data object to an existing DAO database object ...

as this is a working solution to my *problem* with not much to reprogram ... i'm quit happy to close the question
... and let the points be devided between timcottee and mdougan !!! (How do i that ??? if a take 1 comment as an answer that person gets al the points, yes ???)

still a little puzzled why i have to use this workaround to be able to run the program on some *** computers ...

0
 
LVL 18

Expert Comment

by:mdougan
ID: 7131976
Yes, I'm puzzled too.  However, it is because of the inconsistencies of the data controls that most people avoid using them in their projects.  If you wish to "bind" a control such as a grid, then they are a necessity (at least with DAO), but for this reason, I always code using "unbound" techniques.  They do take more coding, but they are much more consistent.

As for splitting the points, you can post a zero point question to the community support topic area, with a reference to the URL for this question.  Ask them to divide the points any way that you wish, between whichever experts you wish.

They will handle reducing the points for this question, and then creating a "For Points" type of question for the other expert.

Cheers!
0
 

Expert Comment

by:ComTech
ID: 7138239
A request for points split left in CS, I have reduced the point amount for a split between:

100=TimCottee
100=mdougan

I will accept TimCottee here at the question, and will create a new question for mdougan in this same Topic Area.  The question will be titled, Points for mdougan.

The split is now complete.

Best regards,
ComTech
Community Support Administrator  
Experts-Exchange  
0
 

Expert Comment

by:ComTech
ID: 7138249
0

Featured Post

What Is Threat Intelligence?

Threat intelligence is often discussed, but rarely understood. Starting with a precise definition, along with clear business goals, is essential.

Join & Write a Comment

Most everyone who has done any programming in VB6 knows that you can do something in code like Debug.Print MyVar and that when the program runs from the IDE, the value of MyVar will be displayed in the Immediate Window. Less well known is Debug.Asse…
Enums (shorthand for ‘enumerations’) are not often used by programmers but they can be quite valuable when they are.  What are they? An Enum is just a type of variable like a string or an Integer, but in this case one that you create that contains…
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…

705 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now