Friday, November 21, 2014

Linking First table

After the previous step of preparation for necessary image, we are now going to start the first task in programming our system.

Close the KCBData file and open the KCBSystem with your Microsoft Access. After opening, you will note that the database is still empty. We are going to link the first table as below:

In your Microsoft Access, Select "External Data" menu, followed by selecting the Access button to open the "Get External Data - Access Database" dialogue box. Click the Browse... button and browse to the c:\KCBDatabase\Data folder and select the KCBData.accdb file. Make sure the "Link to data sourxe..." radio button is selected.

By clicking the OK button, a new "Link Tables" dialogue box will open and you will note that there is on the table "tblSettings" which we created previously available in the table tab. Clicking OK on this new dialogue box will close the dialogue box and return to our KCBSystem database with the tblSettings being linked.

Take note that there is a little right-pointing arrow on the side of the table, indicating that this is a linked table.

The above steps of actions are necessary whenever we need to link a table. We can also import the table by selecting the "Import..." radio button in the "Link Tables" dialogue instead of the "Link..." radio button.

By importing, the table is reside in this database and if we copy the database as a file by means of file explorers or save with a different name, the table will follow. By means of linking, we can then assure that even if we save the name of KCBSystem to a different name, the data will stay the same when we open the new file. This is the trick we used to make sure the data will never be amended even if we copy the file "KCBSystem" onto a different computer.

So, all tables in our system will be created in the KCBData file and linked to KCBSystem which act as the front end of the database system. I can then give the KCBSystem file to my college to run with Microsoft Access runtime program with out problem. I can then modify and upgrade my copy of KCBSystem freely. Only when a new function is complete developing, I can then distribute the new KCBSystem for others to replace their old copy. This is then a method of updating the program system without affecting whatever data that had been stored in the KCBData.

Below is a sanpshot of my KCBSystem with a single tlbSettings table linked.


No comments:

Post a Comment