線上訂房服務-台灣趴趴狗聯合訂房中心
發文 回覆 瀏覽次數:1436
推到 Plurk!
推到 Facebook!

So complicated question for me

答題得分者是:ccchen
is_tem
一般會員


發表:17
回覆:15
積分:11
註冊:2002-04-17

發送簡訊給我
#1 引用回覆 回覆 發表時間:2002-08-23 02:16:56 IP:61.10.xxx.xxx 未訂閱
If you have a complicated query table for data entry, such as Select * from TableA where Field1 = :A......FieldN = :N order by Field1 and Field2. OK, you have a icon, report a summary report. Then you will find that you need to create another query for the report, such query may be Select * from TableA where Field1 = :A......FieldN = :N order by Field2 and Field3. Actually, the data of the report is actually the data of the data entry, and you may find the two queries are likely, but the order phase. Such design is OK but the maintainence is hard as we need to maintain two queries. If there any method to obtain data from a dataset for different purpose. One query for data entry, (ordered by keyA and keyB), same query for report (ordered by keyB and keyC).
ccchen
版主


發表:61
回覆:940
積分:1394
註冊:2002-04-15

發送簡訊給我
#2 引用回覆 回覆 發表時間:2002-08-23 08:06:47 IP:61.219.xxx.xxx 未訂閱
你可以使用TBDECLientDataSet 如此, 可以隨時改變indexfieldnames
is_tem
一般會員


發表:17
回覆:15
積分:11
註冊:2002-04-17

發送簡訊給我
#3 引用回覆 回覆 發表時間:2002-08-23 09:18:27 IP:218.102.xxx.xxx 未訂閱
But Clientdataset only sort one column, same Select ..... order by keya while in application, I need Select ..... Order by Keyb, keyc, keyd **** It is because, I need group report.
ccchen
版主


發表:61
回覆:940
積分:1394
註冊:2002-04-15

發送簡訊給我
#4 引用回覆 回覆 發表時間:2002-08-23 20:56:08 IP:203.217.xxx.xxx 未訂閱
But Clientdataset only sort one column, 可以多個column clientdataset1.indexfieldnames:='field1;field2'; 甚至若須要多column且有的Ascending, 有的Descending也可稍麻煩些須runTime Create index
系統時間:2024-04-19 20:40:50
聯絡我們 | Delphi K.Top討論版
本站聲明
1. 本論壇為無營利行為之開放平台,所有文章都是由網友自行張貼,如牽涉到法律糾紛一切與本站無關。
2. 假如網友發表之內容涉及侵權,而損及您的利益,請立即通知版主刪除。
3. 請勿批評中華民國元首及政府或批評各政黨,是藍是綠本站無權干涉,但這裡不是政治性論壇!