smn=ASCAN(a_view, 'sman_view')
cus=ASCAN(a_view, 'cust_view')
mod=ASCAN(a_view, 'model_view')
ord=ASCAN(a_view, 'order_view')
ENDIF
IF prm=0
CREATE SQL VIEW propmodel_view CONNECTION remote_01 SHARE ;
AS SELECT model.key_model, model.name_model, model.swept_volume, ;
model.quantity_drum, model.capacity, model.torgue, model.top_speed, model.starting, ;
model.quantity_door, model.quantity_sead, model.length, model.width, ;
model.height, model.expense_90, model.expense_120, model.expense_town, ;
firm.name_firm, country.name_country,fuel_oil.name_fuel_oil, ;
tyre.name_tyre, body.name_body ;
FROM model ,firm, country, fuel_oil, tyre, body ;
WHERE model.key_firm=firm.key_firm ;
AND firm.key_country=country.key_country ;
AND model.key_fuel_oil=fuel_oil.key_fuel_oil ;
AND model.key_tyre=tyre.key_tyre ;
AND model.key_body=body.key_body
ENDIF
IF lau=0
CREATE SQL VIEW lauto_view CONNECTION remote_01 SHARE ;
AS SELECT automobile_passenger_car.key_model, automobile_passenger_car.date_issue, ;
automobile_passenger_car.cost, account.selled ;
FROM automobile_passenger_car, account ;
WHERE automobile_passenger_car.key_auto=account.key_auto
ENDIF
IF smn=0
CREATE SQL VIEW sman_view CONNECTION remote_01 SHARE ;
AS SELECT salesman.key_salman, ;
salesman.last_name+' '+salesman.first_name+' '+salesman.patronymic as sman ;
FROM salesman
ENDIF
SELECT * FROM sman_view INTO ARRAY Arcombo1
IF cus=0
CREATE SQL VIEW cust_view CONNECTION remote_01 SHARE ;
AS SELECT customer.key_customer, customer.name_customer ;
FROM customer
ENDIF
SELECT * FROM cust_view INTO ARRAY Arcombo2
IF mod=0
CREATE SQL VIEW model_view CONNECTION remote_01 SHARE ;
AS SELECT model.key_model, model.name_model ;
FROM model
ENDIF
SELECT * FROM model_view INTO ARRAY Arcombo3
IF ord=0
CREATE SQL VIEW order_view CONNECTION remote_01 SHARE ;
AS SELECT order_.key_order, order_.key_salman, order_.key_customer, order_.key_model ;
FROM order_
&& Устанавливаем таблицу order_ обновляемой
=DBSETPROP('order_view', 'View', 'Tables', 'order_')
&& Устанавливаем имена для обновления
=DBSETPROP('order_view.key_order', 'Field', 'UpdateName', 'order_.key_order')
=DBSETPROP('order_view.key_salman', 'Field', 'UpdateName', 'order_.key_salman')
=DBSETPROP('order_view.key_customer', 'Field', 'UpdateName', 'order_.key_customer')
=DBSETPROP('order_view.key_model', 'Field', 'UpdateName', 'order_.key_model')
&& Задаем простой уникальный ключ на основе одного поля таблицы Order_
=DBSETPROP('order_view.key_order', 'Field', 'KeyField', .T.)
&& Задаем обновляемые поля
=DBSETPROP('order_view.key_salman', 'Field', 'Updatable', .T.)
=DBSETPROP('order_view.key_customer', 'Field', 'Updatable', .T.)
=DBSETPROP('order_view.key_model', 'Field', 'Updatable', .T.)
&& Активизация процесса обновления
=DBSETPROP('order_view', 'View', 'SendUpdates', .T.)
&& Задаем сравнение временной метки всех полей записи,
converted to PDF by HupBaH9I