Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Cloned Dataset

Posted on 2008-06-13
6
Medium Priority
?
1,165 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 400 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 400 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 600 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

New benefit for Premium Members - Upgrade now!

Ready to get started with anonymous questions today? It's easy! Learn more.

Question has a verified solution.

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

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 my programming career I have only very rarely run into situations where operator overloading would be of any use in my work.  Normally those situations involved math with either overly large numbers (hundreds of thousands of digits or accuracy re…
In this video you will find out how to export Office 365 mailboxes using the built in eDiscovery tool. Bear in mind that although this method might be useful in some cases, using PST files as Office 365 backup is troublesome in a long run (more on t…
Want to learn how to record your desktop screen without having to use an outside camera. Click on this video and learn how to use the cool google extension called "Screencastify"! Step 1: Open a new google tab Step 2: Go to the left hand upper corn…
Suggested Courses

721 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