Thread View: comp.lang.pascal.delphi.misc
3 messages
3 total messages
Started by Michal Borsuk
Wed, 13 Aug 2003 06:59
CreateDataSet - doesn't create the file (D7)
Author: Michal Borsuk
Date: Wed, 13 Aug 2003 06:59
Date: Wed, 13 Aug 2003 06:59
29 lines
2073 bytes
2073 bytes
Hello. I have this problem with ClientDataSet in Delphi 7. I want the program to create the file (cds.FileName), but it fails. Here's the line if not FileExists (cds.FileName) then cds.CreateDataSet; I got this from Marco Cantu's book: " you can physically create the file for the table with the Create DataSet command on the ClientDataSet component's shortcut menu in the Delphi IDE or by calling its CreateDataSet method at run time." But there are problems with saving the file from menu -> right-click and this command: "Save to mybase binary file" "Save to MyBase XML file" Neither saves the FieldsDefs properly when updated. I heard that D7 is generally quite buggy... should I switch to D6? Regards, -- Michal Borsuk www.sitefinder.pl
Re: CreateDataSet - doesn't create the file (D7)
Author: Michal Borsuk
Date: Wed, 13 Aug 2003 07:24
Date: Wed, 13 Aug 2003 07:24
25 lines
1940 bytes
1940 bytes
Michal Borsuk wrote: > > Hello. > > I have this problem with ClientDataSet in Delphi 7. I want the program > to create the file (cds.FileName), but it fails. Here's the line > > if not FileExists (cds.FileName) then cds.CreateDataSet; Fogrot to add something. If the file is .cds, then the condition "if not FileExists (cds.FileName) " is true, so the "cds.CreateDataSet" is executed. If the file is xml, then even the condition doesn't "catch" it, the file is not present, but "cds.CreateDataSet" isn't invoked. Weird. Was xml available in D6? LMB -- Michal Borsuk www.sitefinder.pl
Re: CreateDataSet - doesn't create the file (D7)
Author: Michal Borsuk
Date: Wed, 13 Aug 2003 07:31
Date: Wed, 13 Aug 2003 07:31
24 lines
1950 bytes
1950 bytes
Michal Borsuk wrote: > [...] > I got this from Marco Cantu's book: > " you can physically create the file for the table with > the Create DataSet command on the ClientDataSet component's shortcut > menu in the Delphi IDE or by calling its CreateDataSet method at run > time." Did I get this wrong? Do I have to save the dataset created with CreateDataSet, like this : "cds.SaveToFile(cds.FileName);" OR is CreateDataSet supposed to write the file? Thanks, -- Michal Borsuk www.sitefinder.pl
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads