-=-
.
.....
  
 
RSS
Direkomendasikan menggunakan brower Opera/Chrome/Firefox. Resolusi minimal 1024x768 | Powered by ____ |
 
  
 
Nikmati Delphi-ID dalam berbagai versi tampilan :
Basic View (LOW Bandwidth)
Default View (Full)
Mobile Edition
Main Menu
..:: onWebTools ::..
..:: onLastPosts ::..
goto Post2 query di satu report(1)
 by kepiss
 on 04.Feb at 18:25
goto PostLowongan Kerja IT Coordinator(2)
 by madi
 on 02.Feb at 15:05
goto Postaccess ke foxpro(0)
 by idhiel
 on 02.Feb at 14:29
goto PostASK: TMS TAdvColumnGrid(0)
 by batozai
 on 02.Feb at 14:03
goto Post[ask] buat funtion dengan nilai return berupa record(0)
 by irosyidi
 on 02.Feb at 11:29
goto Posttanya inno setup mentog(5)
 by jowo
 on 01.Feb at 13:11
goto PostMembuat executable Delphi 2009 + dbExpress(0)
 by zuq
 on 01.Feb at 11:41
goto PostKapan ya delphi-id bikin jaket lagi....??(41)
 by sidiq_himura
 on 31.Jan at 17:02
goto PostuniGUI, bikin aplikasi web pakai delphi as easy as ABC(18)
 by R-One
 on 22.Jan at 19:45
goto PostAba(d)ikan: Tempat (wc) umum orang ngaco dan o-on Versi 2(132)
 by asiyrob
 on 20.Jan at 09:53
goto Postkomponen delphi 7(6)
 by idhiel
 on 19.Jan at 18:41
goto Post[HELP] Fungsi komponen DataModule and IBQuery...(0)
 by binyo
 on 19.Jan at 15:43
goto PostKenapa Firebird tidak AutoCommit ????(27)
 by binyo
 on 19.Jan at 15:30
goto Post[ HELP ] Pencerahan tentang database yang sering digunakan.(9)
 by binyo
 on 19.Jan at 15:08

..:: onLast Articles ::..
..:: New Download ::..
Pascal-id.Org
Feeds -  Popular -  Latest
RE: The Longue
5 months, 1 week ago
RE: belajar pascal
5 months, 1 week ago
RE: The Longue
5 months, 1 week ago
RE: belajar pascal
5 months, 1 week ago
RE: Perkenalan dan Absen
5 months, 1 week ago
RE: Alhamdulillah Buka Puasa Bersama
5 months, 1 week ago
RE: تَقَبَّلَ اللهُ مِنَّا وَمِنْكَ - Selamat Hari Raya Idul Fitri
5 months, 1 week ago
Lintas Situs
Feeds -  Popular -  Latest
TSafeMe… BindMe
10 months, 3 weeks ago
TSafeMe… BindMe
10 months, 3 weeks ago
TSafeMe… BindMe
10 months, 3 weeks ago
TSafeMe… BindMe
10 months, 3 weeks ago
PowerLogic SDK
1 year ago
Game/Physics Engine Theory: Subtraction-based Geometry Destruction Transformation (Part 1)
2 months, 4 weeks ago
WMI Tasks using Delphi – Processes
2 months, 4 weeks ago
Memory leaks on OS X
2 months, 4 weeks ago
47 on November 7th, 2011
3 months ago
WMI Tasks using Delphi – Printers and Printing
3 months ago
«
free web site stats and visitor tracking

Post new topic   Reply to topic
View previous topic Printable version Log in to check your private messages View next topic
Author Message
iwancsOffline
Location:
Post subject: Problem dengan master detail  PostPosted: 13/Aug/2010 05:23
onNovice


Joined: 20-Jan-2006
Posts: 13

Status: Offline
Sori gan, gue binun ama topiknya, susah jelasin dengan singkat, jadi langsung aja yah.

Gini gue dah buat master detail tabel dengan tclientdataset, gak pake nested detail, jadi master detail di client aja. Terus gue coba tambah 1 data di master dan 2 data di detailnya, nah masalah terjadi pada saat gue pengen hapus semua data di detail. Jadi gue coba gue edit dulu master, karena kan banyakan kalo di transaksi kita gak tau apa yang bakal di lakukan user, jadinya pasti tabel master gue edit, trus gue gak ubah apapun di tabel master, langsung gue hapus semua detailnya. setelah gue lakukan cdsMaster.post, eh tuh data detail pada nongol balik semua. Tapi kalo di apply update data tetep kehapus di database, tapi di cdsDetail tetap gak keapus.

Pelacakan pun dimulai, hasil investigasi:
- Saat perintah post, ternyata provider dari tabel master tadi memanggil event BeforeGetRecords, yang berarti setiap ada perubah TDataset.State, baik dari browse ke edit, atau edit ke browse selalu mengambil data detail ke server
- Kondisi ini yang bikin masalah, jadinya setiap kali gue lakukan post di tabel master, data detail ke ambil lagi
- Investigasi lanjutan dapetin juga kalo ternyata pada saat gue hapus data detail, sebenernya di clientdataset itu memang sudah di flag usDeleted, ini gue buktiin dengan set StatusFilter jadi tampilin semua status, jadinya pas perintah cdsMaster.Post, muncul 4 record, 2 berstatus usDeleted, 2 lagi berstatus usUnModified.
- Satu - satunya cara untuk bisa bersihin detail yang nongolin data yang dah di hapus, ya dengan perintah refresh di tabel detail itu.

Masalahnya adalah gue maunya sebisa mungkin menghindari perintah refresh di detail. Ada kah rekan yang bisa bantu?

TIA, iwan
 
 View user's profile Send private message  
Reply with quote Back to top
elva_ivana
Location:
Post subject:   PostPosted: 14/Aug/2010 09:09
onProfessional


Joined: 22-Jan-2008
Posts: 593

wah, kurang ngerti nih maksud dari @iwancs
yg master yg mana .. yg detail yg mana ... yg mo d hapus yg mana ..
coba tampilkan structur table sama sample data yg telah dibuat
biar para master bisa lebih gampang bantu nya ...
 
 View user's profile Send private message Visit poster's website  
Reply with quote Back to top
iwancsOffline
Location:
Post subject:   PostPosted: 15/Aug/2010 10:40
onNovice


Joined: 20-Jan-2006
Posts: 13

Status: Offline
Hmm... begini aku hanya ceritain secara teori aja, di coba aja buat tabel master dan detail sederhana, karena struktur apapun gak pengaruh, semua tabel master detailku mengalami hal yang sama.

Intinya adalah:
- Tambah 1 data di tabel master, sebut cdsMaster
- Kemudian tambah 2 data di tabel detail, sebut cdsDetail
- Kemudian simpan transaksi hingga proses ApplyUpdate
- Kemudian lakukan edit pada cdsMaster
- Kemudian pada data yang sama, hapus 2 data di cdsDetail, artinya kan semua data detail yang ada
- Nah kemudian panggil perintah cdsMaster.Post
- Nah pada step ini, semua data di cdsDetail yang seharusnya sudah terhapus, muncul lagi

Untuk informasi, aku coba di D2010, tapi dulu ada project di D7 juga mengalami hal yang sama, cuman baru nyadarnya sekarang aja

Thanks for the help

      elva_ivana wrote:
wah, kurang ngerti nih maksud dari @iwancs
yg master yg mana .. yg detail yg mana ... yg mo d hapus yg mana ..
coba tampilkan structur table sama sample data yg telah dibuat
biar para master bisa lebih gampang bantu nya ...
 
 View user's profile Send private message  
Reply with quote Back to top
phytoOffline
Location:
Post subject:   PostPosted: 03/Sep/2010 00:15
onBeginner


Joined: 10-Aug-2010
Posts: 4

Status: Offline
database apa?
 
 View user's profile Send private message  
Reply with quote Back to top
Display posts from previous:     
Jump to:  
All times are GMT - 12 Hours
Post new topic   Reply to topic
View previous topic Printable version Log in to check your private messages View next topic





Powered by PNphpBB2 © 2003-2009 The Zafenio Team
Credits


| Register | Lost Password ? |