tag:blogger.com,1999:blog-6222893893652665733.post5962787607709839751..comments2024-01-08T00:30:35.594-08:00Comments on Cary Jensen "Let's Get Technical": Now Available: Delphi in Depth: ClientDataSets 2nd EditionUnknownnoreply@blogger.comBlogger15125tag:blogger.com,1999:blog-6222893893652665733.post-3864917770272529902016-10-11T12:06:25.005-07:002016-10-11T12:06:25.005-07:00alschopenhauer: Not sure I am entirely sure what y...alschopenhauer: Not sure I am entirely sure what you are asking, but I think I have a good idea. If the ADOQuery is closed prior to the DataSetProvider opening it, the DataSetProvider will close that ADOQuery once the data is loaded into the ClientDataSet. So, one set of data in memory, not two.Cary Jensenhttps://www.blogger.com/profile/09264435441034661563noreply@blogger.comtag:blogger.com,1999:blog-6222893893652665733.post-15897515177516709302016-10-02T20:48:15.786-07:002016-10-02T20:48:15.786-07:00In other words (not counting the, DataSource and D...In other words (not counting the, DataSource and DBGrid): ¿<br /> AdoQuery <-- DataSetProvider <-- ClientDataset <-- DataSource <-- DBGrid<br /> <br />consumes two times more memory than<br /> AdoQuery <-- DataSource <-- DBGrid<br /><br />because AdoQuery gets memory for its data and for definition ClientDataSet is a "in memory data".?alschopenhauerhttps://www.blogger.com/profile/13808206101109033478noreply@blogger.comtag:blogger.com,1999:blog-6222893893652665733.post-51932455818698041952016-10-02T20:34:09.377-07:002016-10-02T20:34:09.377-07:00Hi Mr. Cary:
Im new to ClientDatasets. I amreadi...Hi Mr. Cary:<br /> Im new to ClientDatasets. I amreading your articles on:<br /> http://delphi.about.com/od/usedbvcl/a/tclientdataset.htm<br />So my fundamental question is (I have Delphi 7):<br /> For example, I can use <br />AdoQuery <-- DataSetProvider <-- ClientDataset<br /> | ^<br /> | |<-- DataSource <-- DBGrid<br /> |<br /> ^<-- Another_DataSource <-- Another_DBGrid <br /><br />That weird configuration (for the last part (Another_DataSource, Another_DBGrid )), is only to show that seems like the ADoQuery loads data from its query, for its own use.<br /><br />So, i was wondering if<br />AdoQuery <-- DataSetProvider <-- ClientDataset<br /> ^<br /> |<-- DataSource <-- DBGrid<br />alone, makes the application that uses a ClientDataSet to load TWO times (one for the query, one for the ClientDataSet) the data, and so use TWO TIMES more memory than a "standard" way like (not counting the memory that a DBGrid uses)<br /> AdoQuery <-- DataSource <-- DBGrid<br /><br />I hope i was clear. Thank you a lot for your time.alschopenhauerhttps://www.blogger.com/profile/13808206101109033478noreply@blogger.comtag:blogger.com,1999:blog-6222893893652665733.post-39871521106421110742015-06-20T19:36:26.010-07:002015-06-20T19:36:26.010-07:00The answer is No. You cannot define any part of th...The answer is No. You cannot define any part of the ClientDataSets structure, including the nested datasets, once the ClientDataSet is active (has been created). Sorry.Cary Jensenhttps://www.blogger.com/profile/09264435441034661563noreply@blogger.comtag:blogger.com,1999:blog-6222893893652665733.post-71667520546604369872015-05-12T22:29:00.699-07:002015-05-12T22:29:00.699-07:00Sorry, I fix my table structs below:
CREATE TABLE ...Sorry, I fix my table structs below:<br />CREATE TABLE myBook(ISBN NVARCHAR(20), BKName NVARCHAR(50), PRIMARY KEY(ISBN));<br />GO<br />CREATE TABLE myEmp(ISBN NAVRCHAR(20), EmpID INTEGER, EmpName NVARCHAR(10), PRIMARY KEY(ISBN,EmpID));<br />GOEdenhttps://www.blogger.com/profile/10463719837677844391noreply@blogger.comtag:blogger.com,1999:blog-6222893893652665733.post-29030772606099954702015-05-12T21:00:02.162-07:002015-05-12T21:00:02.162-07:00About Nested DataSets.
Could define nested dataset...About Nested DataSets.<br />Could define nested dataset at runtime in opened ClientDataSet?<br /><br />My table structs and code below:<br />CREATE TABLE myBook(ISBN NVARCHAR(20), BKName NVARCHAR(50), EmpID INTEGER, PRIMARY KEY(ISBN, EmpID));<br />GO<br />CREATE TABLE myEmp(EmpID INTEGER, EmpName NVARCHAR(10), PRIMARY KEY(EmpID));<br />GO<br /><br /> SQLQuery1.CommandText := 'SELECT * FROM myBook';<br /> ClientDataSet1.Data := DataSetProvider1.Data;<br /> SQLQuery2.CommandText := 'SELECT * FROM myEmp';<br /> ClientDataSet2.Data := DataSetProvider2.Data;<br /><br /> ClientDataSet1.Close;<br /> ClientDataSet1.FieldDefs.Clear();<br /> ClientDataSet1.FieldDefs.Update();<br /> with ClientDataSet1.FieldDefs.AddFieldDef do<br /> begin<br /> Name := 'SubNested';<br /> DataType := ftDataSet;<br /> end;<br /> for vPos := 0 to ClientDataSet1.FieldDefs.Count-1 do<br /> ClientDataSet1.FieldDefs[vPos].CreateField(ClientDataSet1);<br /> ClientDataSet1.Open;<br /><br />I get a error message: 'Field 'SubNested' not found' in CreateField line, why?Edenhttps://www.blogger.com/profile/10463719837677844391noreply@blogger.comtag:blogger.com,1999:blog-6222893893652665733.post-49094765087005478862015-05-12T20:47:59.198-07:002015-05-12T20:47:59.198-07:00Thank you!
It's great!Thank you!<br />It's great!Edenhttps://www.blogger.com/profile/10463719837677844391noreply@blogger.comtag:blogger.com,1999:blog-6222893893652665733.post-78575404495260422162015-03-03T07:46:08.491-08:002015-03-03T07:46:08.491-08:00Brian:
There are several examples that demonstrat...Brian:<br /><br />There are several examples that demonstrate the basics of a simple, local, single user system. These include CDSFilter and CDSSearch. However, the one that really comes closest is the VideoLibrary example. That example can be found in both the Paradox and InterBase versions of the code download.<br /><br />There is one point that I want to emphasis. A stand alone system does not use a DataSetProvider. DataSetProviders are used to interface a ClientDataSet with an underlying database server. In a stand alone, single user system the ClientDataSet loads and saves its data from a local file. I hope this helps.Cary Jensenhttps://www.blogger.com/profile/09264435441034661563noreply@blogger.comtag:blogger.com,1999:blog-6222893893652665733.post-8457479946522859032015-02-23T21:09:41.311-08:002015-02-23T21:09:41.311-08:00My boss bought this book at my request. I'm lo...My boss bought this book at my request. I'm looking forward to finally getting to grips with what these components can do, instead of just using them to read data from SQL Server, and building my own SQL statements for insert/updates like some sort of caveman :) Thank you for writing the book! BTW in chapter one, where you explain that CDS can be used for a simple local, single user system, I think a more thorough explanation and sample might help. I dug around the sample projects to find which one was applicable and it didn't take long to understand the moving parts, but as an introductory segment, I'd have liked to be shown how to make a simple "save to file" application, with all the moving parts (Load/Save/Createdataset/filename/datasetprovider/clientdataset) explained, as if to a caveman like me :)<br /><br />Thanks again!Brianhttps://www.blogger.com/profile/13747055386430398635noreply@blogger.comtag:blogger.com,1999:blog-6222893893652665733.post-6759829712638140932015-02-13T04:50:25.877-08:002015-02-13T04:50:25.877-08:00You will find the answer here: http://caryjensen.b...You will find the answer here: http://caryjensen.blogspot.com/2015/02/using-trim-in-clientdataset-filters.htmlCary Jensenhttps://www.blogger.com/profile/09264435441034661563noreply@blogger.comtag:blogger.com,1999:blog-6222893893652665733.post-9900682527855838412015-02-11T22:03:32.172-08:002015-02-11T22:03:32.172-08:00I used TClientDataSet.Filiter.
CDS's Filiter s...I used TClientDataSet.Filiter.<br />CDS's Filiter support "Trim" statement in Delphi help doc.<br /><br />It support "Trim(Name, '.')". But, How to used the statement?Edenhttps://www.blogger.com/profile/10463719837677844391noreply@blogger.comtag:blogger.com,1999:blog-6222893893652665733.post-3666457888311420992015-01-22T10:16:49.253-08:002015-01-22T10:16:49.253-08:00Olaf: Great idea. You can now find a link to the b...Olaf: Great idea. You can now find a link to the book's foreword, written by Marco Cantù, and the introduction, which describes the book and its contents, at the following Web site: <br />http://JensenDataSystems.com/cdsbook2Cary Jensenhttps://www.blogger.com/profile/09264435441034661563noreply@blogger.comtag:blogger.com,1999:blog-6222893893652665733.post-40858851372683673952015-01-15T11:14:03.908-08:002015-01-15T11:14:03.908-08:00Embarcadero has not done much to the ClientDataSet...Embarcadero has not done much to the ClientDataSet in many years, though to be honest, its feature set is more or less complete. It is true that the FDMemTable will be the focus of new development, but it still has a long way to go before it will be a suitable replacement for the ClientDataSet. In short, the FDMemTable lacks a number of useful features that are supported by ClientDataSets, such as cached updates with nested datasets. I am not knocking FDMemTable, I am just saying that if you replace your ClientDataSets with FDMemTables today you will lose some pretty important functionality. Cary Jensenhttps://www.blogger.com/profile/09264435441034661563noreply@blogger.comtag:blogger.com,1999:blog-6222893893652665733.post-72764617839444743892015-01-13T03:58:59.882-08:002015-01-13T03:58:59.882-08:00It would be neat if you were to publish the first ...It would be neat if you were to publish the first chapter as a "teaser".Olafhttps://www.blogger.com/profile/17127127762963015116noreply@blogger.comtag:blogger.com,1999:blog-6222893893652665733.post-19371033753461034722015-01-12T22:11:10.003-08:002015-01-12T22:11:10.003-08:00I am curious about the futur of the TClientDataSet...I am curious about the futur of the TClientDataSet in RAD Studio. What I read in the net is, that EMB doesn't improve that component anymore. The are now focused on TFDMemTable. It seams the want to replace TClientDataSet with TFDMemTable. Is that rumor true?Anonymoushttps://www.blogger.com/profile/12278839475508115043noreply@blogger.com