DMO, RDO, DAO and ADO demonstrator

Program DMORDODAOADO.vbp has intention to brief and efficiently demonstrate the ways of connection on the jet, ODBC and SQL databases that contain tables with difficult names, i.e. the names that are consisted of SQL reserved words and spaces. The demonstration includes the database browsing, table accessing, reading and adding the new data in DMO, RDO, DAO and ADO database interfaces. I have decided to make the program due to insufficiency of information in MSDN library especially related to pure DAO ODBC connection (not trough linked table in JET database). The program explains an extraordinary feature of the ADO data interface to establish disconnected record set and then to reconnect and resynchronize it with the originating database. These buttons are yellow colored:

 The program also demonstrates the way of using with and end with commands together with the new one to generate temporary class objects like ADODB.Connection, ADODB.Recordset and so on. The manner of temporary class declaration may significantly improve readability of program by reduction of variables and code lines and due that to facilitate teamwork and permanent improving process of program development.

Instruction for Installation

For proper installation it is necessary to transfer tables from dao.mdb into appropriate SQL server and to make ODBC connection named “adodaoSQL” referenced to database that contains the tables from SQL database “dao.mdb”. The ODBC connection has to have the same name “adodaoSQL”. The easiest way to make the database with the dao.mdb on the Microsoft SQL server is to use UPSIZING WIZARD. The wizard has ability to transfer database from the MDB state to SQL server. It also generates the appropriates SQL scripts for referential integrity. The outstanding wizard can save hours of database programming. On picture bellow is path to the wizard:

The following picture shows the first screen after the “Upsizing Wizard” is choused and it describes how to create database on SQL server:


The picture below shows the screen right after “Next>” is clicked and in the combo box should be entered the name of the available SQL serve, not the TEST1 that is just an example and the name of the database that should be formed on the SQL server has to be daoSQL - it is necessary for proper execution of the example program:

Fine tuning of the Upsizing Wizard should be performed on the next stage on which the Use triggers option should be choused:

Next picture shows the stage on which the name of the Access program that has to be generated too and that will access only the generated database. For the program example the name of database should be daoMDB:

After all these statements are performed well, the resultant database has to be checked from the SQL Server Enterprise Manager:

Now, we have to make appropriate ODBC connection to SQL database that has just been generated from the dao.mdb.
The ODBC connection can be made by the appropriate option on the Control Panel window or by starting \WINNT\system32\odbcad32.exe. The following picture shows the first window of the ODBC wizard:

The Add button should be pressed:

The SQL driver is the only appropriate one for our situation. After the Finish button is pressed, the SQL server is one that has to be chosen:

If the SQL server and the program are sited on the same machine, the Server has to be described as “(local)”. The database username and password has to be defined on the next stage:

The “Next” should be pressed:

The assignation of the particular database has to be set on the following stage obtained by the “Next” button pressing:

After the “Finish” button is pressed the appears the final window:

The check whether everything are O.K. can be obtained by pressing the “Test Data Source…” button:

If all steps are performed correctly the demonstrational program will work properly.

 


 

Please read the following paragraph carefully:

This program is freeware and thus it can be freely distributed. The author will not be responsible for any kind of loss occurring due to the usage of that one. This program should not be distributed for commercial purposes. The name of the author must stay visible in program.

If you agree with terms above press the following key for download:

 


 

Attention:

As this is free and unsupported software, I am not responsible in any way for damage, mistakes and all other dissatisfactions connected with the program. You are invited to write me but I cannot promise you an answer. However you may write me at andrijar@andrijar.com.

Author:
Dipl.-Ing. Andrija S. Radović
E-mail: dmordodaoado@andrijar.com
Web: http://www.andrijar.com/