about 【Delphi】【問題】ADO Query Master-Detail刪除問題 |
|
webber
初階會員 發表:54 回覆:76 積分:26 註冊:2004-04-20 發送簡訊給我 |
我之前問過「【Delphi】【問題】ADO Query Master-Detail刪除問題 」
http://delphi.ktop.com.tw/topic.php?TOPIC_ID=59697
感謝cashxin2002前輩熱情回答 另外我在Marco Cantù寫Mastering Delphi 7有看到解決的方法 Chapter 15: Working with ADO
.....
The biggest problem with the ADO solution can be seen when a row in a join is deleted. The deletion attempt will appear to fail.
.......
Two SQL DELETE statements are generated: one for the Suppliers table and then another for the Products table.
.......' you can achieve this result using another dynamic property—in this case, the Unique Table dynamic property. You can specify that deletes refer to just the Products table and not to Suppliers using the following line of code: ADOQuery1.Properties['Unique Table'].Value := 'Products'; This value cannot be assigned at design time, so the next best alternative is to place this line in the form's OnCreate event. Mastering Delphi 7是本好書
有空我還是從頭看完好了.. K.Top是我見過最棒的程式社群
如果沒有K.Top真不知道該怎麼活 |
webber
初階會員 發表:54 回覆:76 積分:26 註冊:2004-04-20 發送簡訊給我 |
本站聲明 |
1. 本論壇為無營利行為之開放平台,所有文章都是由網友自行張貼,如牽涉到法律糾紛一切與本站無關。 2. 假如網友發表之內容涉及侵權,而損及您的利益,請立即通知版主刪除。 3. 請勿批評中華民國元首及政府或批評各政黨,是藍是綠本站無權干涉,但這裡不是政治性論壇! |