This page is devoted to my latest Asymetrix Toolbook related project called TBdao. DAO is short for Database Access Object and is a microsoft product that comes with a lot of new Microsoft products like msoffice 97. It simplifies database access and gives access to the msaccess jet engine and has a backdoor to ODBC databases too. The DAO engine itself is a OLE32 control that is access by TBdao through an 32 bits mfc 4.2 dll written in Microsoft Visual C++ 5.0 (SP3).

The Toolbook-II demo that can be downloaded is a fully functional dll that can retrieve info from an access database demo called advworks.mdb. All files should be copied into one directory. The TBdao demo only supports reading the database and retrieving infromation about the database like fieldsizes, names and types. Modifying the database is what I'm curently working on.The TBdao dll is a debug build and doesn't contain a lot of checks yet (like if the database really exists), so may crash in which case win95 has to be rebooted.

DAO works by defining a workspace that can contain a number of databases (for example mdb files). Each database in it's turn can contain a number of recordsets (SQL queries) that can be read.

Through attached tables or external datasources dao should be able to read dbase files, excel spreadsheets and paradox tables too. It also provides a backdoor to ODBC called ODBCdirect so there is a possibility that you can access SQL server and Oracle too.

Under windows NT 4 the dll has more features like being able to update and add records to a database. This due to the fact that 16 bits apps are not allowed to start multiple threads in 32 bits dll's under win95 (seems to be a feature of win95 by design and not a asymetrix thingy). Dao is a multithreaded ocx control, altough it only seems to use additional threads when updating and adding record.

Lastest developments:

  • I updated the tbdao dll so it's statically linked to mfc instead of dynamically. That way it's easier to get the demo up and running. I also removed some debugging messageboxes and put my name inside the dll's.
  • The toolbook application now detects windows NT 4 and will show more features there.
  • I included the full source of the dll for those who have access to msvc 5.0. Please let me know if
    you do anything with it, as i like to hear it.
  • Under windows NT 4.0 updating AND appending records works. The demo is changed a bit so it only will run the code for modifying the database only works when running under windows NT 4.0. Beware to unzip all three files into the same directory as there's no handling of missing database files etc yet in the script. The code still contains some debugging dialogs (sorry, but i still need them) and I've compacted the archive a bit for faster downloading.
  • I've succeeded in altering a record under windows NT 4 but keep having a bit of a problem with the same code under win95 (the update works but still throws an exception with a undefined errorcode).
  • I've also added a number of new functions to query database properties like number of tables etc.
  • I discovered that by design a 16 bits application under win95 is not allowed to create more than a single thread in
    a 32 bits dll. This is the reason update/append won't work under win95. Winnt4 doesn't have this limitation.