Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

TClientDataSet

Status
Not open for further replies.

tjcusick

Programmer
Dec 26, 2006
134
0
0
US
Using Delphi 7

Does anyone have a simple example on setting up a Client Dataset?

I am not reading my data from a table or a file but I am reading the name of files in a directory.

Tom C
 
Thanks JES1904.

Next question on this... Here is my scenario...

I am reading the file names and sizes from a directory and putting them into a Client Dataset.
Then I am comparing the sizes of each of them to see when they are finished building in the folder (Timer).
Once the file size remains the same (for 3 iterations) the file is then moved to a destination directory and a txt file is generated stating where the file was put.
After the file is moved out of the source directory, I delete it out of the Client Dataset.

I see there is a method called ApplyUpdate(error) associated with the Client Dataset.
Do I need to implement this ApplyUpdate(error) after I delete my filename from the Client Dataset?
Is this how to clean up the Client Dataset so that the memory doesn’t get out of control?

Tom Cusick
 
I only started working with Clientadatasets recently so I'm no expert. A clientdataset exists only in memory. ApplyUpdates will make changes in the memory data and in the Delta property which is a record of all changes made to the database. Moving through the database using First, Last, Next, etc will also post the changes made in individual records as you leave them, but will not make an entry in the "Delta" property unless the LogChanges parameter is true.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top