From: sparre@meyer.fys.ku.dk (Jacob Sparre Andersen)
Subject: Re: New ada user
Date: 1997/05/11
Date: 1997-05-11T00:00:00+00:00 [thread overview]
Message-ID: <1997May11.193035.3813@news.nbi.dk> (raw)
In-Reply-To: 335B7AE5.446B@univ-pau.fr
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 1350 bytes --]
od (cnam05@univ-pau.fr) wrote:
| HI!I am a new ada user. I would like to create a database with
| customers adresses, etc... but i really don't know how to manage and
| above all how to start : create records, use them, search for one
| information, etc... Any help is welcome. Thanks
It sounds like you should use the package Ada.Direct_IO, if you plan to map
the database tables to a file.
It's probably a good idea to have a used/not used flag in your record. It
could be done in this way:
type File_Record (In_Use : Boolean := False) is
record
case In_Use is
when True =>
Name : Name_Type;
Address : Address_Type;
when False =>
null;
end case;
end record;
Then you overwrite a record with a File_Record'(In_Use => False) to delete
it.
When you want to insert a new record, you can first look for records, where
In_Use is False, otherwise you'll have to write the new record at the end
of the file.
Greetings,
Jacob
--
Jacob Sparre Andersen http://www.nbi.dk/%7Esparre/
Center for Chaos and Turbulence Studies Phone: (+45) 39 65 53 51
The Niels Bohr Institute (+45) 35 32 53 05
--
G�r dine X-programmer danske - p� 5 minutter: http://www.nbi.dk/~nordfalk/ovs/
next prev parent reply other threads:[~1997-05-11 0:00 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
1997-04-21 0:00 New ada user od
1997-05-11 0:00 ` Jacob Sparre Andersen [this message]
1997-05-13 0:00 ` Michael F Brenner
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox