BorlandTalk.com Forum Index BorlandTalk.com
Borland discussion newsgroups
 
Archives   FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

ClientDataSet SaveToFile problem

 
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> Delphi Databases (Multi-Tier)
View previous topic :: View next topic  
Author Message
Brad Miller
Guest





PostPosted: Tue Apr 06, 2004 8:26 pm    Post subject: ClientDataSet SaveToFile problem Reply with quote



So I replaced a horribly slow COM/ActiveX single-tier app with a
ClientDataSet. Performance is fantastic, everything is great. Then I
realize that I'm not doing enough savetofile calls, as I wnat the data
to be as current as possible in the event that the app/pc shuts down
unexpectedly. So I'm testing this by loading up the cds, then killing
the app. When the app is restarted, the data is there as I expect. But
then attempting to do further saveToFile calls is leading to
EFCreateError exceptions, claiming it cannot create the file "mycds.cds".

Now I have never seen this kind of behavior before, and I'm a bit
puzzled as to what could be going on.

This is D5.

Any ideas greatly appreciated!

Brad
Back to top
G. Allen Casteran
Guest





PostPosted: Wed Apr 07, 2004 12:49 am    Post subject: Re: ClientDataSet SaveToFile problem Reply with quote



In article <4073128a (AT) newsgroups (DOT) borland.com>,
[email]Windopaene (AT) nohaminYAHacanformeOO (DOT) COM[/email] says...
Quote:
So I replaced a horribly slow COM/ActiveX single-tier app with a
ClientDataSet. Performance is fantastic, everything is great. Then I
realize that I'm not doing enough savetofile calls, as I wnat the data
to be as current as possible in the event that the app/pc shuts down
unexpectedly. So I'm testing this by loading up the cds, then killing
the app. When the app is restarted, the data is there as I expect. But
then attempting to do further saveToFile calls is leading to
EFCreateError exceptions, claiming it cannot create the file "mycds.cds".

Now I have never seen this kind of behavior before, and I'm a bit
puzzled as to what could be going on.

This is D5.

Any ideas greatly appreciated!

Brad


Where is that file being created??

It's possible tht the OS still flags the file as "open" and is giving
you an error as a result. If you delay a while or reboot the PC, does
the problem go away??

Allen.


Back to top
Brad Miller
Guest





PostPosted: Wed Apr 07, 2004 3:58 pm    Post subject: Re: ClientDataSet SaveToFile problem Reply with quote



G. Allen Casteran wrote:
Quote:
In article <4073128a (AT) newsgroups (DOT) borland.com>,
[email]Windopaene (AT) nohaminYAHacanformeOO (DOT) COM[/email] says...

So I replaced a horribly slow COM/ActiveX single-tier app with a
ClientDataSet. Performance is fantastic, everything is great. Then I
realize that I'm not doing enough savetofile calls, as I wnat the data
to be as current as possible in the event that the app/pc shuts down
unexpectedly. So I'm testing this by loading up the cds, then killing
the app. When the app is restarted, the data is there as I expect. But
then attempting to do further saveToFile calls is leading to
EFCreateError exceptions, claiming it cannot create the file "mycds.cds".

Now I have never seen this kind of behavior before, and I'm a bit
puzzled as to what could be going on.

This is D5.

Any ideas greatly appreciated!

Brad



Where is that file being created??

It's possible tht the OS still flags the file as "open" and is giving
you an error as a result. If you delay a while or reboot the PC, does
the problem go away??

Allen.

Yes this is all I could think of as well. It's possible that it is some

kind of wier permissions problem as well. This is on an XP "network",
with no logins or anything, and the Output directory for the app is on
the file server, not my box. And when I've run it solely on my box, it
appears to be working right. It was just such an odd thing, that I've
never seen before in many years of working with cds files. Thanks for
the ideas.

Brad

Back to top
G. Allen Casteran
Guest





PostPosted: Wed Apr 07, 2004 4:20 pm    Post subject: Re: ClientDataSet SaveToFile problem Reply with quote

Quote:
Yes this is all I could think of as well. It's possible that it is some
kind of wier permissions problem as well. This is on an XP "network",
with no logins or anything, and the Output directory for the app is on
the file server, not my box. And when I've run it solely on my box, it
appears to be working right. It was just such an odd thing, that I've
never seen before in many years of working with cds files. Thanks for
the ideas.

Brad

Bingo. With that information it is clear that your problem is the delay
in the XP "server" closing the old connection to your workstation. When
the WS crashes, it takes a while for the server to notice that its no
longer there. Until that time the server still has the WS's files open
on the server. As Far as your app is concerned another station has the
file open and locked.

Allen.


Back to top
Pete Wason
Guest





PostPosted: Sat Jul 24, 2004 9:55 pm    Post subject: Re: ClientDataSet SaveToFile problem Reply with quote

G. Allen Casteran wrote:
Quote:
Yes this is all I could think of as well. It's possible that it is some
kind of wier permissions problem as well. This is on an XP "network",
with no logins or anything, and the Output directory for the app is on
the file server, not my box. And when I've run it solely on my box, it
appears to be working right. It was just such an odd thing, that I've
never seen before in many years of working with cds files. Thanks for
the ideas.

Brad


Bingo. With that information it is clear that your problem is the delay
in the XP "server" closing the old connection to your workstation. When
the WS crashes, it takes a while for the server to notice that its no
longer there. Until that time the server still has the WS's files open
on the server. As Far as your app is concerned another station has the
file open and locked.

Allen.



However, I am getting the same error in my app and everything is local.
I'm running D6Pro on XPHome. My CDSs are loaded from (and ostensibly saved to)
paths like

.dataReviews.cds

What's even more odd about this is that it seems to be happening only under
circumstances where I let the user open a file dialog to retrieve a filename
which is then put into a field on the form. All they need is the file name, not
the path, and everything seems to work as expected until I try to close the CDS
(thus writing it to disk). I get the EFCreateError exception, and no changes
get saved.

Pete


Back to top
Display posts from previous:   
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> Delphi Databases (Multi-Tier) All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2006 phpBB Group
SEO toolkit © 2004-2006 webmedic.