comp.lang.ada
 help / color / mirror / Atom feed
From: "David Botton" <David@Botton.com>
To: <comp.lang.ada@ada.eu.org>
Subject: Easy databases with Ada
Date: Tue, 11 Sep 2001 00:57:52 -0400
Date: 2001-09-11T00:57:52-04:00	[thread overview]
Message-ID: <mailman.1000184292.11730.comp.lang.ada@ada.eu.org> (raw)

I've added a new package gwindows-databases that allows easy access to OLEDB
and ODBC databaes via ADO.

I hope to add very soon events for changes to fields, record moevment, etc.
and databound controls. Yup, you will be able to link text boxes, etc. to
fields in the database and automaticly have them update when you move around
the queries/tables, edit the field values, etc. The power of Ada with the
ease of VB (or Delphi ;-)

Here is a simple non-GUI example of using the databases (from Tutorial 18):

with GNATCOM.Initialize;
with GWindows.GStrings.IO; use GWindows.GStrings.IO;
with GWindows.Databases; use GWindows.Databases;

procedure Tutorial18 is
   Connection : Database_Type;
   Recordset  : Recordset_Type;
begin
   GNATCOM.Initialize.Initialize_COM;

   Open (Connection,
         "Provider=Microsoft.Jet.OLEDB.4.0; " &
         "Data Source=adotest.mdb");

   Open (Recordset,
         Connection,
         "SELECT * FROM People",
         Forward_Only,
         Read_Only);

   while not EOF (Recordset) loop
      for N in 1 .. Field_Count (Recordset) loop
         Put_Line
           (Field_Name (Recordset, N) & " = " & Field_Value (Recordset, N));
      end loop;

      Move_Next (Recordset);
      New_Line;
   end loop;
end Tutorial18;


Couldn't get any easier! All this and more in the current release on the
GWindows page, http://www.adapower.com/gwindows

BTW, Check out the tutorials on-line at
http://www.adapower.com/gwindows/user_guide.html

David Botton




                 reply	other threads:[~2001-09-11  4:57 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox