Problem in Rfile

Login to reply to this topic.
Tue, 2007-06-26 13:49
Joined: 2006-11-22
Forum posts: 73

Hi to all,
i want to create a file and update there data after reading its value

eg. if i create a file temp.txt and write a value "1" in to this after reading this value i want to remove this from file and write another value "2".

Please tell me what should be the good way to do this.

Thanks in Advance


Tue, 2007-06-26 14:11
Joined: 2005-06-23
Forum posts: 21
Re: Problem in Rfile

Have a look at the file Handles Replace method. i hope that will solve ur problem.

Wed, 2007-06-27 05:02
Joined: 2004-05-21
Forum posts: 285
Re: Problem in Rfile

If you have simple and less operations on file then you can use RFile. Google for RFile and you will find many links which talks about RFile. If your app does heavy read/write operations then you can go for stores.

Cheers,
Sri

Wed, 2007-06-27 06:35
Joined: 2006-11-22
Forum posts: 73
Re: Problem in Rfile

I read all documents but there is no any method for removing(or overwriting) the previous data.

Thanks

Wed, 2007-06-27 07:16
Joined: 2005-11-20
Forum posts: 1210
Re: Problem in Rfile

Overwriting is simple: You re-position with the help of RFile::Seek() and write. Whatever was there before at that particular position in the file will be overwritten. Thus no need to "remove" something first.


René Brunner

  • Login to reply to this topic.