comp.lang.ada
 help / color / mirror / Atom feed
From: "axu" <alex.crivat@gmail.com>
Subject: Re: GNADE
Date: 25 Oct 2006 14:40:12 -0700
Date: 2006-10-25T14:40:12-07:00	[thread overview]
Message-ID: <1161812412.559468.4880@e3g2000cwe.googlegroups.com> (raw)
In-Reply-To: <87bqo0qlc5.fsf@ludovic-brenta.org>

Thanks for your answers :)
But ! ;)
The reason I've asked this was becaus I spent the whole day trying to
use in some way the native binding of GNADE to mysql. Obviously I've
missed something so I'll abuse of your kindness and post my program
here. If you see any problems please kik me in the head :)

--------------------------------------------------------------------------------------------------------------

procedure Server is
  dBase      : MySQL.Object;
  qId        : MySQL.Query_ID;
  haut       : Integer;
begin
  -- database initialisation
  Initialize(dBase);
  User(dBase, "user");
  Password( dBase, "pass" );
  Connect(  dBase, "localhost" );
  Select_DB( dBase, "base" );

  qID := Query( dBase, "select S_HAUTEUR from t_liens where
PK_LIENS=5");
  haut := Integer_Field( dBase, qID, 14 );

  exception
    when Field_Type_Error => Put_Line("Field type error");
    when No_Query_Result  => Put_Line("No result");
    when No_More_Rows     => Put_Line("No more rows");
    when Except : Others => Put_Line( "Fatal error, uncatched exception
" & Exception_Name( Except )
                                                   & Ascii.CR &
Ascii.LF & "Message: " & Exception_Message( Except ));
  Disconnect(dBase);
  Finalize(dBase);
end Server;
--------------------------------------------------------------------------------------------------------------
In mysql the field S_HAUTEUR is:
mysql> select S_HAUTEUR from t_liens where PK_LIENS=5;
+-------------------+
| S_HAUTEUR |
+-------------------+
|         0          |
+-------------------+
1 row in set (0.00 sec)
+---------------------+------------------+------+-----+---------+----------------+
 | Field              | Type           | Null | Key | Default | Extra
|
+---------------------+------------------+------+-----+---------+----------------+
 | S_HAUTEUR  | int(11)         | NO  |      | 0
________________________________________________________________

The program compiles fine but at runtime it crushes with:
------
Fatal error, uncatched exception CONSTRAINT_ERROR
Message: gnu-db-mysql.adb:1198 range check failed
------
Ok I've dig in and found that the exception is raised by the
Get_Field_Type function in gnu-db-mysql.adb and the cause I belive is
that the actual mysql type for this field does not have a coresponding
type in the enumeration Mysql_Field_Types.

So, if anyone from gnade see this please enlight me. Also he may tell
as what is the status of the mailling list gnade-devel cause I've got
no answer from the moderator after
my subscription.

Thanks everyone for your time
Best regards
Alex

On Oct 25, 9:52 pm, Ludovic Brenta <ludo...@ludovic-brenta.org> wrote:
> axu writes:
> > Is GNADE still active ?
> > Their last release dates from january 2005...and I wonder if someone
> > still manages it.
> > If not ..where can I find some database related libraries ?
> > (mysql/postgresql)The CVS repository contains a more recent version, dating back to
> December 2005.  Even though the project seems to be inactive, GNADE is
> mature and production-worthy; you can use it.
>
> There is an alternative called APQ by Warren W. Gray; it supports both
> PostgreSQL and MySQL.  Seehttp://home.cogeco.ca/~ve3wwg/software.html
>
> ... but the last update is September 25, 2004!  I think APQ is also
> mature and quite usable.
> 
> --
> Ludovic Brenta.




  reply	other threads:[~2006-10-25 21:40 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-10-25 17:25 GNADE axu
2006-10-25 18:52 ` GNADE Ludovic Brenta
2006-10-25 21:40   ` axu [this message]
2006-10-26  8:57     ` GNADE Ludovic Brenta
2006-10-26 10:17       ` GNADE axu
2006-10-26  9:48     ` GNADE Stephen Leake
2006-10-26 10:04       ` GNADE axu
2006-10-25 19:58 ` GNADE Georg Bauhaus
2006-10-26  8:17   ` GNADE Dmitry A. Kazakov
2006-10-26 10:01     ` GNADE axu
  -- strict thread matches above, loose matches on Subject: below --
2018-12-08 23:19 GNADE lyttlec
2018-12-09  0:14 ` GNADE julian.fondren
2018-12-09  0:40 ` GNADE Jere
2018-12-09  8:33 ` GNADE Simon Wright
2018-12-10 18:41 ` GNADE Maxim Reznik
2002-07-12  7:59 GNADE Marek Bialoglowy
2002-07-13  8:04 ` GNADE Ingo Marks
2002-07-14 22:24 ` GNADE Pascal Obry
replies disabled

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