Board index » delphi » a stupid question but please help - records saving

a stupid question but please help - records saving

I need to save a series or data of a record type (let's say a.name
a.tel)
but when i retrieve what i saved the program tells me "read beyon end of
file", now, this is simple pascal here, no rocket science, i create the
file with rewrite, then write the first (or several) record, then close
the file, when i need to add i open it with appends and read from it
with read, what's wrong then?

any ideas?

thanks! please e-mail the answer too

--
Uri Fridman

urif...@yahoo.com
u...@afek.co.il

"...the further we go, the older we grow,
the more we know, the less we show..."

-----BEGIN PGP PUBLIC KEY BLOCK-----
Version: PGPfreeware 6.0.2i

<encoded_portion_removed>
JHOCBRhTIQCeJJ4e5BaZNb9x3h7gCJ9mo3zmHuQ=
=T+ef
-----END PGP PUBLIC KEY BLOCK-----

 

Re:a stupid question but please help - records saving


When you "append" to a file, it puts you at the end of the file so you can
write to it, not read from it.

--

Woody
[Atheism is a non-prophet organization.]

Quote
Uri Fridman <u...@afek.co.il> wrote in message

news:37FC526A.90830A57@afek.co.il...
I need to save a series or data of a record type (let's say a.name
a.tel)
but when i retrieve what i saved the program tells me "read beyon end of
file", now, this is simple pascal here, no rocket science, i create the
file with rewrite, then write the first (or several) record, then close
the file, when i need to add i open it with appends and read from it
with read, what's wrong then?

any ideas?

thanks! please e-mail the answer too

--
Uri Fridman

urif...@yahoo.com
u...@afek.co.il

"...the further we go, the older we grow,
the more we know, the less we show..."

-----BEGIN PGP PUBLIC KEY BLOCK-----
Version: PGPfreeware 6.0.2i

<encoded_portion_removed>
JHOCBRhTIQCeJJ4e5BaZNb9x3h7gCJ9mo3zmHuQ=
=T+ef
-----END PGP PUBLIC KEY BLOCK-----

Other Threads