Форум АНТИЧАТ

Форум АНТИЧАТ (https://forum.antichat.xyz/index.php)
-   С/С++, C#, Delphi, .NET, Asm (https://forum.antichat.xyz/forumdisplay.php?f=24)
-   -   IBX и Master-Detail в Delphi (https://forum.antichat.xyz/showthread.php?t=31178)

Mirovan 13.01.2007 10:47

IBX и Master-Detail в Delphi
 
Добрый день.

Возник вопрос при использовании технологии master-detail.

Есть некая БД, в ней таблицы (u_dir - универсальный справочник, people - таблица людей):


Код:

create table u_dir(
  id integer not null constraint u_dir_pk primary key,
  name varchar(50) not null,
  owner integer constraint u_dir_fk references u_dir(id) on delete cascade on update cascade
  );


create table people(
  id integer not null constraint people_pk primary key,
  sirname integer not null constraint people_fk1 references u_dir(id),
  name integer not null constraint people_fk2 references u_dir(id),
  lastname integer not null constraint people_fk3 references u_dir(id),
  address varchar(100) not null,
  sex integer not null,
  doc varchar(20) not null constraint people_uk1 unique,      /*pasport*/
  pol_num varchar(20) not null constraint people_uk2 unique,  /*Strah. polic*/
  date_of_birth date not null
  );

Требуется используя технологию mater-detail и IBX вывести данные в DBGrid, чтобы можно было просматривать данные таблицы people. Есть ли способ не указывать MasterFileds в IBTable, но чтобы выводились все данные из u_dir на которых ссылаются поля в таблице people через REFERENCE?


Время: 13:42