
D Eloquence Library
idb_info(base,qual,mode,status,buffer) int base; void *qual; int mode; int status[10]; void *buffer;The parameters are:
Idb_info can be used to make application programs independent of the database structure. If this procedure is used to retrieve all structural information, including item and set numbers, new data items and data sets can be added to the database without affecting existing programs.
struct m101 {
int item_number;
}
struct m102 {
char item_name[16];
char item_type;
char blanks[3];
int subitem_length;
int subitem_count;
}
struct m103 {
int item_count;
int item_numbers[];
}
The data items are listed in the order in which they are defined in the item part of the schema.
struct m104 {
int field_count;
int item_numbers[];
}
typedef struct m201 {
int set_number;
}
The data set number is positive if the security class has only read access to the data set. The number is negative if the security class has both read and write access.
typedef struct m202 {
char set_name[16];
char set_type;
char blanks[3];
int entry_length;
char blanks2[4];
int entry_count;
int capacity;
}
struct m203 {
int set_count;
int set_numbers[];
}
typedef struct m204 {
int set_count;
int set_numbers[];
}
The data set number is positive if the security class has only read access to the data item. The number is negative if the security class has both read and write access.
struct m301 {
int search_item_count;
struct {
int set_number;
int search_item_number;
int reserved;
} path_list[];
}
If the qualifier specifies a master data set, the returned set numbers identify the linked detail sets. The corresponding search item number identifies the search item in the linked detail set. If the master has no detail sets, the search item count is zero. If the qualifier specifies a detail data set, the returned set numbers identify the linked master sets. The corresponding search item number identifies the item in the detail data set. If the detail set has no master sets, the search item count is zero.
struct m302 {
int item_number;
int parent_set_number;
}
struct m501 {
int index_item_number;
}
struct m502 {
char iitem_name[16];
int iitem_seg_cnt;
struct {
int item_number;
int item_length;
} seg[8];
}
struct m503 {
int iitem_count;
int iitem_numbers[];
}
The index items are listed in the order in which they are defined in the index item part of the schema.
struct m504 {
int iitem_count;
int iitem_numbers[];
}
The index items are listed in the order in which they are defined for the set index in the schema.
| Element | Meaning |
|---|---|
| 0 | S_OK |
| 1 | number of bytes transferred into buffer |
| 2 | 0 |
| 3 | unchanged |
| 4 | 0 |
| 5 | DB_INFO | (open_mode <<12) |
| 6 | 0 |
| 7 | 0 |
| 8 | mode |
| 9 | 0 |
union info info;
if(idb_info(dbid,"ORDER",202,status,&info))
error_handler();
printf("Set name: %16.16s\\n", info.info_202.name);
printf("Set type: %c\\n", info.info_202.type);
...
This will describe the ORDER data set.