inm logo
Corporate Website | Contact | Store | Support | Login  
     


Knowledgebase
View categorized listing of all common frequently asked questions.
Downloads
View our categorized library of downloads for all necessary manuals, software, etc.
 Article Options
Support Center » Knowledgebase » INM V12 Database for Director » Using multiple instances of a V12 table
Support Page Banner
 Using multiple instances of a V12 table
Product:Platform:Area:Version:
INM V12 Database for Director Windows, Macintosh General database and table use Versions 1.x-3.x

Summary

In some applications, it is useful to create more than one Xtra instance for a given table. The advantage of such a duplication is to keep several selections and several current records for the same table.

Example

This example defines two table instances (gTable1 and gTable2) for the table: articles. The selection in gTable1 is sorted by order of price, whereas in gTable2 it is sorted by order of name.

set gTable1 = New(Xtra "V12table", mGetRef(gDB), "articles")
set gTable2 = New(Xtra "V12table", mGetRef(gDB), "articles")
mOrderBy(gTable1, "price")
mOrderBy(gTable2, "name")
mSelectAll(gTable1)
mSelectAll(gTable2)

Note

1. The multiple instance definition technique is sometimes convenient for Read-Only databases but can lead to inconsistencies when used in Read/Write mode. This happens particularly when editing a current record that is also the current record of the other instance.

2. Each table instance takes up RAM.



Article Details
Article ID: 115
Created On: 26 Sep 2006 02:45 PM

 This answer was helpful  This answer was not helpful

inm general footer
Services Xtras Go Products Support Gallery Store Download About Us Contact Newsroom