Easysoft SQI-Unisys LINC Developer Driver User Guide - Demonstration
Demonstrating the Easysoft SQI-Unisys LINC Developer Driver
This section contains two exercises to consolidate the information presented so far.
Although the exercises were created with and make reference to Microsoft Access, they can both be carried out with any ODBC-compliant SQL tool.
To run these exercises you must have:
- completed the installation of the Easysoft SQI-Unisys LINC Developer Driver in "Installation" on page 19 (LDA III itself does not need to be installed on your system) and thus have the Sample_LDAIII DSN connected to the Easysoft sample database
- use of an ODBC compliant SQL tool (preferably Microsoft Access).
If you use Microsoft Access you can ignore any text boxes marked "SQL".
Using the Easysoft Sample DSN
1. Start Microsoft Access and create a blank database.
2. Select File > Get External Data > Link Tables to connect to the sample database.
The Link dialog box is displayed, showing the existing databases on your system:
Figure 22: The Link dialog box in Microsoft
3. From the Files of type drop-down list, choose ODBC Databases.
The Select Data Source dialog box is displayed.
Figure 23: The Select Data Source dialog box
4. Click the Machine Data Source tab.
5. Select Sample_LDAIII and click OK.
Recall that this is the name of the data source you created during the install process (see Figure 6 on page 27).
Microsoft Access now displays the Link Tables window, showing a list of available data sets.
6. Click Select All to select all the tables shown, and then click OK.
After a short wait, you are returned to the Database window.
7. Double-click on SAMPLE_CUST to open the data set as a table.
Notice the MAINT field, which shows you the most recent action performed on the record.
This is present because the Use LDA MAINT check box was not selected during the install process.
Note also the ROWID field, which is generated by the Easysoft SQI-Unisys LINC Developer Driver driver in order to guarantee a unique reference for each row.
In general SQL, you can view subset of records like this:
SELECT * FROM sample_cust WHERE rowid<6;
8. Navigate to any record that contains a C or an A in the MAINT field.
Note the value in the CUSTOMER field and then select Edit > Delete Record.
You may get a confirmation box at this point, depending on how you have configured Microsoft Access. Confirm that you wish to perform the deletion.
DELETE FROM sample_cust WHERE rowid=1;
9. Close the datasheet and then open it again by double-clicking SAMPLE_CUST.
SELECT * FROM sample_cust;
Your record has returned, with a D in the MAINT field. This is because the Easysoft SQI-Unisys LINC Developer Driver DSN was configured with the Use LDA MAINT check box unselected.
The MAINT field is maintained but not honoured.
Many clients perform some degree of caching to reduce server load, which may make it appear as if the record really has been deleted. For instance, using Records > Refresh in Microsoft Access will not cause the record to return. You must close and re-open the datasheet.
Two Short Exercises
This section sets two exercises without step-by-step instructions.
They cover the key aspects of the Easysoft SQI-Unisys LINC Developer Driver, and each is presented with a short list of points to note.
1. Change the setting of the Use LDA MAINT check box a couple of times and observe how deletions in your client really result in data disappearing.
A few hints:
- Use the Windows ODBC Administrator (Start > Settings > Control Panel, then the ODBCicon) to get to the Easysoft SQI-Unisys LINC Developer Driver configuration dialog box (see "Creating a data source" on page 38).
- When making changes to a data source, some clients (e.g. Microsoft Access) do not implement those changes immediately, and it may be necessary to close the client or re-link the tables.
- Changing the setting of the Use LDA MAINT check box effectively changes the description of the table returned by removing the MAINT column.
In Microsoft Access the link-tables therefore need to be deleted and recreated.
- Note that with the Use LDA MAINT check box selected, deletions really do disappear. They do not return when you quit and re-enter the database.
- When Use LDA MAINT is cleared again, those deleted records reappear, since they were never physically deleted. The rows were concealed only because the Easysoft SQI-Unisys LINC Developer Driver driver honoured the MAINT status field.
2. Change the setting of the Physical deletion check box and observe the change in behaviour when deleting with your client.
- Even with the Use LDA MAINT check box cleared and the MAINT column displayed, deleted records disappear for good.
- Clearing the Physical Deletion check box does not result in their reinstatement.