Помогите с вьюхой
Добавлено: 15 ноя 2006, 18:40
Блин написал вьюху откомпилилась в приказе без ошибок...
Но вот значения никакие не выводит
Сам код:
.Create View wyuha ! // переменные fios, podr, doljn вывыдоит пустыми
Var AppointmentsNrec :Comp;
fios :string;
podr :string;
doljn :string;
As Select catalogs1.name, catalogs2.name, persons.fio, persons.TABNMB
From
Appointments, catalogs catalogs1, catalogs catalogs2, persons
Where
((
AppointmentsNrec == Appointments.Nrec
and
Appointments.department==Catalogs1.Nrec
and
Appointments. POST==Catalogs2.Nrec
and
Appointments.PERSON == persons.nrec
));
и далее
.begin
If(wyuha.GetFirst Appointments=tsOk)
If(wyuha.GetFirst persons=tsOk)
Fios:= wyuha.persons.fio;
end.
.begin
If(wyuha.GetFirst Appointments=tsOk)
If(wyuha.GetFirst catalogs1=tsOk)
podr:= catalogs1.name;
end.
.begin
If(wyuha.GetFirst Appointments=tsOk)
If(wyuha.GetFirst catalogs2=tsOk)
doljn:= catalogs2.name;
end.
Но вот значения никакие не выводит
Сам код:
.Create View wyuha ! // переменные fios, podr, doljn вывыдоит пустыми
Var AppointmentsNrec :Comp;
fios :string;
podr :string;
doljn :string;
As Select catalogs1.name, catalogs2.name, persons.fio, persons.TABNMB
From
Appointments, catalogs catalogs1, catalogs catalogs2, persons
Where
((
AppointmentsNrec == Appointments.Nrec
and
Appointments.department==Catalogs1.Nrec
and
Appointments. POST==Catalogs2.Nrec
and
Appointments.PERSON == persons.nrec
));
и далее
.begin
If(wyuha.GetFirst Appointments=tsOk)
If(wyuha.GetFirst persons=tsOk)
Fios:= wyuha.persons.fio;
end.
.begin
If(wyuha.GetFirst Appointments=tsOk)
If(wyuha.GetFirst catalogs1=tsOk)
podr:= catalogs1.name;
end.
.begin
If(wyuha.GetFirst Appointments=tsOk)
If(wyuha.GetFirst catalogs2=tsOk)
doljn:= catalogs2.name;
end.