DDH Software, Inc Making a big world smaller

Return to Knowledgebase Home
Question: How do I convert existing databases/tables and maintain the Links in HanDBase?
Product: General HanDBase TopicArticle Number: 212Creation Date: 11/01/2002
In the current version of HanDBase you will not use the Link and Linked fields to maintain existing relationships if you are importing data into HanDBase from another database program, such as MS Access. If you used a previous version of HanDBase this was how it was done in that version. However in version 4 the way the Link and Linked fields works has changed so this method will not work.

You can however import data using the HanDBase Desktop, from a CSV file, or using the HanDBase Data Exchange for MS Access or ODBC and still maintain relationships you have there. To do this you will leave your fields that establish the relationship in your other application as either Text or Integer fields. Please Note that the fields in both databases MUST be of the same data type.

You will then need to Add a Relationship field to your Parent database. This field will function similar to the way the Link field does but will allow you to use values you define in the database. For the purposes of this example we will say that both databases contain a Name field and the data in that field is what maintains the relationship in your other program. Therfore when you set up the Relationship field for the "Related field in this DB" option you will select the Name field. Then select the other database using the Selector to the Right. The for the "Other Field Name" option you will select the Name field in that other database. For the purposes of this example you can leave the "Show from Other DB" option set to No Field and leave the option for "From Which Record" as it is.

Once you have this set up properly you will be able to open a record in the Parent database and tap the field name for the Relationship field to see the records related to that parent record in your child database

As an added bonus, if you add new records the value in the Name field will be automatically populated based on the corresponding value in the Parent Record.

An example set of databases has been posted to the HanDBase Gallery. It is a very simple set of databases. The Parent database, Relate, has the Name field mentioned above, an Address field and a Relationship field called "Tap for Calls". When you tap that field you are taken to the Linked database, RelateLinked, where you will see the Name field, mentioned above and a Date Called field. The records you see will only be those that have the same name as the parent record you came from.


This article has been viewed 1 times.

Return to Knowledgebase Home