comp.lang.ada
 help / color / mirror / Atom feed
* Easy databases with Ada
@ 2001-09-11  4:57 David Botton
  0 siblings, 0 replies; only message in thread
From: David Botton @ 2001-09-11  4:57 UTC (permalink / raw)
  To: comp.lang.ada

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




^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2001-09-11  4:57 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-09-11  4:57 Easy databases with Ada David Botton

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