Ada Programming/Libraries/Database/GWindows
Library functions
David Botton created GNATCOM project to help Ada interoperate with Windows COM Object. The GWindows project is based on GNATCOM. It is used to create Windows Graphics User Interface.
The database package is a subset of the GWindows project. It is very easy and useful.
Library links
- Author
- David Botton
- Homepage
- http://www.gnavi.org/index.php?Command=Class&ClassID=GWindowsWin32&Title=GWindows
- Project Info
- GWindows
- Library Document
- http://www.gnavi.org/gwindows/ref/gwindows-databases.html
- CVS Archive
- - missing -
- Download
- http://www.gnavi.org
Sample code
withGnatcom.Initialize;withGnatcom.Types;withGnatcom.Variant;withGwindows.Databases;useGwindows.Databases;withAda.Text_IO;useAda.Text_IO;withAda.Strings;withAda.Strings.Fixed;withAda.Exceptions;withSystem;procedureTestisConnection : Database_Type; Recordset : Recordset_Type; customer : Gnatcom.Types.Variant;beginGnatcom.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 business solutionwhilenotEof (Recordset)loopcustomer := Field_Value(Recordset,"customerId"); Process (customer); -- your customer procedure Move_Next (Recordset);endloop; -- release database resource Gwindows.Databases.Close(Recordset);endTest;
See also
Wikibook
Ada Reference Manual
—none apply—