Форум: "Базы";
Текущий архив: 2003.05.15;
Скачать: [xml.tar.bz2];
ВнизIBDataSet и внесение изменений Найти похожие ветки
← →
me2 (2003-04-23 16:12) [0]Использую IBDataSet. В качестве SelectSQL -
select "good_code", "serial_num", "character_id", "good_name", "good_sign", "good_material_sign", "count_descr", "quantity", "price", "firm_code", "description" from GOODS
where "node_id" = :node_id
В качестве ModifySQL -
update "GOODS"
set
"GOODS"."good_code" = :"good_code",
"GOODS"."serial_num" = :"serial_num",
"GOODS"."character_id" = :"character_id",
"GOODS"."good_name" = :"good_name",
"GOODS"."good_sign" = :"good_sign",
"GOODS"."good_material_sign" = :"good_material_sign",
"GOODS"."count_descr" = :"count_descr",
"GOODS"."quantity" = :"quantity",
"GOODS"."price" = :"price",
"GOODS"."firm_code" = :"firm_code",
"GOODS"."description" = :"description"
where
"GOODS"."good_code" = :"OLD_good_code" and
"GOODS"."serial_num" = :"OLD_serial_num" and
"GOODS"."character_id" = :"OLD_character_id" and
"GOODS"."good_name" = :"OLD_good_name" and
"GOODS"."good_sign" = :"OLD_good_sign" and
"GOODS"."good_material_sign" = :"OLD_good_material_sign" and
"GOODS"."count_descr" = :"OLD_count_descr" and
"GOODS"."quantity" = :"OLD_quantity" and
"GOODS"."price" = :"OLD_price" and
"GOODS"."firm_code" = :"OLD_firm_code" and
"GOODS"."description" = :"OLD_description"
Результат запроса можно редактировать, но внесенные изменения не сохраняются даже после Transaction.Commit.
Как сохранить изменения?
← →
Соловьев (2003-04-23 16:13) [1]
Post;
Transaction.Commit;
← →
Johnmen (2003-04-23 16:20) [2]Неясен смысл такого большого where, если есть первичный ключ.
← →
Жук (2003-04-23 16:25) [3]>В качестве ModifySQL -
update "GOODS"
set
"GOODS"."good_code" = :"new_good_code",
"GOODS"."serial_num" = :"new_serial_num",
"GOODS"."character_id" = :"new_character_id",
"GOODS"."good_name" = :"new_good_name",
"GOODS"."good_sign" = :"new_good_sign",
"GOODS"."good_material_sign" = :"new_good_material_sign",
"GOODS"."count_descr" = :"new_count_descr",
"GOODS"."quantity" = :"new_quantity",
"GOODS"."price" = :"new_price",
"GOODS"."firm_code" = :"new_firm_code",
"GOODS"."description" = :"new_description"
where
"GOODS"."good_code" = :"OLD_good_code"
← →
me2 (2003-04-23 16:29) [4]Спасибо. Действительно смысла в перечислении полей в конструкции where никакого нет.
← →
Жук (2003-04-23 16:51) [5]Не только нет, но и вредно, т.к. ни одно из изменений у вас не сохранится, ибо при любом изменении ни выполняется условие where.
Страницы: 1 вся ветка
Форум: "Базы";
Текущий архив: 2003.05.15;
Скачать: [xml.tar.bz2];
Память: 0.45 MB
Время: 0.007 c