From: "bubble" <bubble@bubble.d2g.com>
Subject: Re: ada and database
Date: Mon, 29 Nov 2004 13:55:59 +0800
Date: 2004-11-29T13:55:59+08:00 [thread overview]
Message-ID: <coee91$hp5$1@netnews.hinet.net> (raw)
In-Reply-To: f401fa52.0411280528.7b8c15fc@posting.google.com
copy it from
http://en.wikibooks.org/wiki/Programming:Ada:Libraries:Database:GWindowswith
Ada.Text_Io;
use Ada.Text_Io;
with Gnatcom.Initialize;
with Gwindows.Databases;
use Gwindows.Databases;
with Gnatcom.Types;
with Gnatcom.Variant;
with Ada.Strings;
with Ada.Strings.Fixed;
with Ada.Exceptions;
with System;
procedure test is
Connection : Database_Type;
Recordset : Recordset_Type;
customer : Gnatcom.Types.Variant;
begin
Gnatcom.Initialize.Initialize_Com;
--make connection
Open (Connection,
"DSN=Northwind","your ID","your password");
--make Recordset(ResultSet)
Open (Recordset,
Connection,
"SELECT * from Orders",
Dynamic,
Optimistic);
--start to process your bussiness solution
while not Eof (Recordset) loop
customer:=Gwindows.Databases.Field_Value(Recordset,"customerId");
process(customer);--your customer procedure
Move_Next (Recordset);
end loop;
---release database resource
Gwindows.Databases.Close(Recordset);
end test;
next prev parent reply other threads:[~2004-11-29 5:55 UTC|newest]
Thread overview: 30+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-11-28 13:28 ada and database matias
2004-11-28 14:17 ` Dmitry A. Kazakov
2004-11-28 23:04 ` David Botton
2004-11-29 5:55 ` bubble [this message]
-- strict thread matches above, loose matches on Subject: below --
2001-01-02 17:14 Ada and Database OPERA
2001-01-02 18:26 ` Larry Kilgallen
2001-01-02 18:36 ` Juergen Pfeifer
2001-01-03 15:19 ` Mario Amado Alves
2001-01-04 11:15 ` Preben Randhol
2001-01-04 14:43 ` Robert Dewar
2001-01-04 18:39 ` Preben Randhol
2001-01-04 15:43 ` Florian Weimer
2001-01-05 14:58 ` Mario Amado Alves
2001-01-05 17:22 ` Florian Weimer
2001-01-08 12:40 ` Mario Amado Alves
2001-01-05 14:32 ` Mario Amado Alves
2001-01-06 17:34 ` Robert Dewar
2001-01-06 20:30 ` Larry Kilgallen
2001-01-06 22:37 ` Robert Dewar
2001-01-08 14:55 ` Mario Amado Alves
2001-01-09 4:23 ` Robert Dewar
2001-01-09 10:47 ` Mario Amado Alves
2001-01-09 11:25 ` Preben Randhol
2001-01-09 20:15 ` Florian Weimer
2001-01-10 22:03 ` Robert Dewar
2001-01-11 10:26 ` Mario Amado Alves
2001-01-10 22:03 ` Robert Dewar
2001-01-16 20:35 ` Florian Weimer
2001-01-08 13:14 ` Mario Amado Alves
2001-01-09 4:25 ` Robert Dewar
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox