Arsip: Cache update di zeos

more 17 years ago
dannyong1999
Mo nanya nich tentang cache update di zeos itu gunanya untuk apa ya. Saya sering pakai zeos tapi sayang saya tidak tau fasilitas itu. Dan kegunaanya sejauh mana. Kemaren saya coba aktifkan cache update=true tapi kok gak ada efeknya ya. Mohon infonya. Tq

more 17 years ago
kaka-delphi
coba buka contohnya di $(Delphi)\Demos\Db\CacheDup
This example demonstrates how cached updates can be used with live data and in conjunction with the UpdateSQL component for non-live data. When working with live data, updates are performed by the BDE, otherwise the updates are performed by the UpdateSQL component. The following is a description of what each of the controls in the main form do: o Cached Updates Checkbox This checkbox determines whether cached updates are enabled or not. When unchecked, the other controls which are only relevant while cached updates mode are disabled. In this mode, all edits are immediately applied to the underlying dataset. o UpdateSQL Checkbox This checkbox determines whether the UpdateSQL component is used to perform the cached updates. When the user clicks on this control to check or uncheck it, the dataset is closed and the UpdateObject property is set or cleared and then the dataset is reopened. This is required because the UpdateObject property of TDataSet can only be set while the dataset is closed. You can examine the SQL statements used by the UpdateSQL component by double clicking on it in the data module. o Apply Updates Button Clicking this button causes all pending updates to be applied. o Cancel Updates Button Clicking this button causes all pending updates to be discarded. o Revert Record Button Clicking this button causes any updates to the current record in the grid to be discarded. o Show Records Group Each of the check boxes in the ShowRecords groupbox determine what types of records are displayed in the grid. If you change several records, and then want to only see those record, uncheck all the boxes except for the one marked "modified". If you delete a record and then later decide you want to undelete it, check the deleted box, and then position to the deleted record in the grid and click the revert record button. o ReExecute Query Button Clicking this button forces the dataset to be closed and then reopened. This example also uses a calculated field which shows the current update status of each record (only when cached updates are enabled). Errors which occur during the update process are displayed in a simple form which shows the new and old values together. There are buttons which allow the user to determine what type of action take. To see the update error dialog in action, try changing the ProjID field of one record to be the same as the ProjID of another record. This will cause a key violation when the apply updates button is clicked. When the error dialog comes up, if you click the abort button, no updates will be performed and the dataset will be restored to the state it was in before the updates were applied. If you click the skip button, any other changes you made will be applied, but not the one with the invalid ProjID. The last option would be to change the ProjID to something valid (such as the old value) and then click the retry button. Cached updates provide a powerful new way of working with data since Delphi 2.0. See the Database Application Developers Guide for a complete discussion of this new feature.

more 17 years ago
onsir
bisa ada jelasin pakai bahasa indonesia gak ?, soalnya klw terjemah sendiri malah salah arti.
dari topik yg pernah saya baca di sini, katanya bisa digunakan untuk menghindari proses hang dari penguncian tabel dari printah
StartTransaction
.
.
Commit
else
Roolback
itu menurut pendapat saya dari topik yg saya baca.
soalnya saya juga menanyakan, misal kalau chaceupdate di set True, dan kita tidak menggunakan perintah Transaction/Commit/roolback
lalu bagaimana misal pada saat transaksi terjadi koneksi gagal ?, apakah data tersebut akan di rollback ?
mohon penjelasan para senior delphi, dan bagaimana cara penggunaanya ?

more 17 years ago
onsir
ini saya kutip dari forum ini "
apa ga berbahaya nih make perintah yang ada BeginTrans kayak gini ? sebab menurut pengalaman ku (mungkin hanya diriku sih yang ngalami) setiap kita memulai transaksi begini, otomatis tabel akan terkunci. jadi kalo ada user lain melakukan browse dan data tersebut masih terkunci maka kan menghasilkan timeout
pengalamanku kayak gini:
pas user lagi insert... data lom disimpen nih.. eh user tersebut malah keluar makan. jadi record masih terkunci dalam kondisi insert / belum dipost. wal hasil.. satu kantor yang menggunakan program ku time out semua. whedew.. seharian juga tuh nyari masalahnya.. ternyata gara-gara diriku menggunakan begintrans kayak gitu.
akhirnya untuk mengatasi hal kayak gitu, sebagai penggantinya diriku menggunakan cache update.

more 17 years ago
DelphiExpert
waktu zaman bahula, dbengine cuman kenal konsep lock-unlock, dimana sampai sekarang para programmer/amatiran masih terbiasa menerapkan cara2 tradisional tsb. utk melakukan manipulasi database.
zaman udah berubah, sekarang hampir semua database engine telah menerapkan transactional base.
cara pemogramannya gimana, ya harus menyesuaikan dengan arsitektur yg digunakan, yaitu pakai pasangan BeginTrans - Commit / Rollback[/b:e4a510cc1b], dimana penggunaannya dapat di kawinkan dengan metode CacheUpdate.
CacheUpdate dibuat untuk meminimalisir akses ke physical database, termasuk diataranya komunikasi melalui TCP/IP socket & proses penulisan/pembacaan ke database file.
Artinya, client hanya akan berinteraksi dengan database server (post/get) hanya pada saat data tersebut benar2 akan dirubah/ditambah/dihapus.
sehingga pada mode CacheUpdate, data disisi server tidak akan berubah meskipun disisi client dikau melakukan penambahan, penghapusan, pengeditan dsj. pada banyak records; sebelum [b:e4a510cc1b]UpdatePending / BatchUpdate/ApplyUpdate[/b:e4a510cc1b] dipanggil.
Naah... agar konsistensi data tetap terjaga dari hal2 yg berakibat pada kerusakan/kegagalan penulisan data, maka dikau harus melakukan proses ApplyUpdate tersebut dalam block [b:e4a510cc1b]BeginTrans - Commit / Rollback
Table hanya akan di lock pada waktu dikau panggil BeginTrans, unlock begitu dikau panggil Commit/Rollback. itulah mengapa dilarang keras menggunakan langsung BeginTrans jika data tidak dapat di post secepat mungkin, seperti halnya yg terjadi pada CH, user melakukan Insert (BeginTrans ter/dipanggil), sedang usernya tidak langsung menyimpan/post, malah ditinggal makan/kebelakang dsj. ya tentu saja karena table masih dalam keadaan ter-lock, user lain tidak dapat berbuat apa2 terhadap tabel tsb!
semoga konsep dasar ini dapat dikau mengerti!

more 17 years ago
DelphiExpert
tambahan... metode ApplyUpdate menggunakan blok pasangan BeginTrans - Commit/Update untuk melakukan post terhadap pending data, sehingga dikau ngga' perlu manually menggunakan pasangan BeginTrans - Commit/Update tsb.
sebagian besar contoh/tutorial DB bawaan delphi /buku2 dipasaran tidak dirancang utk berjalan di lingkungan multi-user, kebanyakan stand-alone, maka dari itu programmer2 yg terlanjur terbiasa menggunakan cara seperti di contohkan; tidak dapat menerapkannya secara langsung di lingkungan multi-user. harus ada penyesuaian...

more 17 years ago
DelphiExpert
Cached updates provide a powerful new way of working with data since Delphi 2.0. See the
Database Application Developers Guide for a complete discussion of this new feature.
more ...
- Pages:
- 1
reply |
Report Obsolete
AI Forward

🚀 We're thrilled to partner with Alibaba Cloud for "AI Forward - Alibaba Cloud Global Developer Summit 2025" in Jakarta! Join us and explore the future of AI. Register now:
https://int.alibabacloud.com/m/1000400772/
#AlibabaCloud #DeveloperSummit #Jakarta #AIFORWARD
Last Articles
Last Topic
- PascalTalk #6: (Podcast) Kuliah IT di luar negeri, susah gak sih?
by LuriDarmawan in Tutorial & Community Project more 4 years ago - PascalTalk #5: UX: Research, Design and Engineer
by LuriDarmawan in Tutorial & Community Project more 4 years ago - PascalTalk #4: Obrolan Ringan Seputar IT
by LuriDarmawan in Tutorial & Community Project more 4 years ago - PascalTalk #2: Membuat Sendiri SMART HOME
by LuriDarmawan in Tutorial & Community Project more 4 years ago - PascalTalk #3: RADically Fast and Easy Mobile Apps Development with Delphi
by LuriDarmawan in Tutorial & Community Project more 4 years ago - PascalTalk #1: Pemanfaatan Artificial Intelligence di Masa Covid-19
by LuriDarmawan in Tutorial & Community Project more 4 years ago - Tempat Latihan Posting
by LuriDarmawan in OOT more 5 years ago - Archive
- Looping lagi...
by idhiel in Hal umum tentang Pascal Indonesia more 12 years ago - [ask] koneksi ke ODBC user Dsn saat runtime dengan ado
by halimanh in FireBird more 12 years ago - Validasi menggunakan data tanggal
by mas_kofa in Hal umum tentang Pascal Indonesia more 12 years ago
Random Topic
- database jumlah pengunjung dgn delphi 7 koneksi port serial
by khokho in Hal umum tentang Pascal Indonesia more 15 years ago - Tanya tentang WebServer nih
by sugismail in Tip n Trik Pemrograman more 15 years ago - backup n upload database
by yayaretina in MySQL more 18 years ago - Ada yang tau komponentnya?
by p2bf in Tip n Trik Pemrograman more 17 years ago - Bagaimana Login dengan User Dari MySQL
by jainul in MySQL more 13 years ago - Shared Folder Windows (Windows Security)
by reminder2k1 in OOT more 16 years ago - TQuery yg bisa Cacheupdate..
by wati in Tip n Trik Pemrograman more 13 years ago - Pembayaran International - Paypal
by DelphiExpert in OOT more 17 years ago - list index out of bounds[4]
by lithium in Paradox more 17 years ago - Tutorial Live belajar delphi.....
by EkoIndri in Tutorial & Community Project more 18 years ago