Solved

Cloned Dataset

Posted on 2008-06-13
6
1,137 Views
Last Modified: 2013-11-23
Hi all,

It's me again :) I have another question. I use clientdataset  in my application and i use clonecursor a lot.
My question is if i refresh a record using refreshrecord in the source dataset, why is it the record in the cloned dataset not updated? if i use refresh command, the cloned dataset will be updated.

Thanks,

Reynaldi
0
Comment
Question by:reynaldio
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
6 Comments
 
LVL 13

Assisted Solution

by:rfwoolf
rfwoolf earned 100 total points
ID: 21783426
Well probably because they're 2 datasets and they each have their own cursors and they each have their own recordset (otherwise, what's the point in a clone?). Think of them as two instances of the same database table. You make a change to one, the other one isn't going to know about it until it refreshes - at least that's my take on it, I could be wrong
0
 
LVL 4

Assisted Solution

by:Delphian
Delphian earned 100 total points
ID: 22021145
@rfwoolf

Actually they are 2 with two cursor but using the SAME recordset. So I believe that cds_Source.Refresh will affect the two.
0
 
LVL 9

Accepted Solution

by:
sun4sunday earned 150 total points
ID: 22141147
From Delphi Help

After calling CloneCursor, the data for the client dataset is the same as the data for Source. Edits performed by either client dataset are reflected in the data of both datasets.

Note:      Because cloned cursors are shared, changing properties that affect the cursor affect both datasets. For example, setting the ReadOnly property of either dataset will make both datasets read-only.

Call Refresh to change the base values of the current record to match the current value on the server.

clear details are in the Delphi Help
Unidirectional datasets refresh the data by closing and reopening the cursor.
Unidirectional datasets have no mechanism for locating the current record after a refresh, and always

ClientDataset is unidirectional means its a connectionless state
0
 
LVL 4

Expert Comment

by:Delphian
ID: 22142121
ClientDatasets are bidicional by nature. The provided dataset (the one that T<Anything>Provider links) which can be unidirectional.
0
 
LVL 2

Author Closing Comment

by:reynaldio
ID: 31466953
Thanks guys
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

The uses clause is one of those things that just tends to grow and grow. Most of the time this is in the main form, as it's from this form that all others are called. If you have a big application (including many forms), the uses clause in the in…
Introduction Raise your hands if you were as upset with FireMonkey as I was when I discovered that there was no TListview.  I use TListView in almost all of my applications I've written, and I was not going to compromise by resorting to TStringGrid…
In this video, viewers are given an introduction to using the Windows 10 Snipping Tool, how to quickly locate it when it's needed and also how make it always available with a single click of a mouse button, by pinning it to the Desktop Task Bar. Int…
Monitoring a network: how to monitor network services and why? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the philosophy behind service monitoring and why a handshake validation is critical in network monitoring. Software utilized …
Suggested Courses
Course of the Month10 days, 20 hours left to enroll

628 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question