|
|
|
|
|
- Example: Creating a data file through programming made of 3 items (one of them being a composite key)
Example: Creating a data file through programming made of 3 items (one of them being a composite key) EXTERN Temp_File EXTERN Item1 EXTERN Item2 EXTERN CompItem MyFile1 is File Description MyItem1 is Item Description MyItem2 is Item Description MyItem3 is Item Description MyCompositeKey is Item Description // Declaration of the data file MyFile1.Name = "Temp_File" MyFile1.Type = hFileNormal // Declare the item 1 MyItem1.Name = "Item1" MyItem1.Type = hItemText MyItem1.Size = 20 HDescribeItem(MyFile1, MyItem1) // Declare the item 2 MyItem2.Name = "Item2" MyItem2.Type = hItemText MyItem2.Size = 20 HDescribeItem(MyFile1, MyItem2) // Declare the item 3 MyItem3.Name = "Item3" MyItem3.Type = hItemHour MyItem3.Size = 6 // HHMMSS format HDescribeItem(MyFile1, MyItem3) // Declare the composite key MyCompositeKey.Name = "CompItem" MyCompositeKey.KeyExpression = "Item1+Item2" HDescribeItem(MyFile1, MyCompositeKey) HDescribeFile(MyFile1) HCreation(Temp_File) Temp_File.Item1 = "Montpellier" Temp_File.Item2 = "Paris" HAdd(Temp_File) Temp_File.Item1 = "Marseille" Temp_File.Item2 = "Lyon" HAdd(Temp_File) HReadSeek(Temp_File, CompItem, HBuildKeyValue(Temp_File, CompItem, "Marseille", "Lyon")) IF HFound() = True THEN Trace(Temp_File.Item1, Temp_File.Item2) END
Esta página también está disponible para…
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|