From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-0.9 required=5.0 tests=BAYES_00,FORGED_GMAIL_RCVD, FREEMAIL_FROM autolearn=no autolearn_force=no version=3.4.4 X-Google-Thread: 103376,72d589f91726c72c X-Google-Attributes: gid103376,public X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news2.google.com!postnews.google.com!e3g2000cwe.googlegroups.com!not-for-mail From: "axu" Newsgroups: comp.lang.ada Subject: Re: GNADE Date: 25 Oct 2006 14:40:12 -0700 Organization: http://groups.google.com Message-ID: <1161812412.559468.4880@e3g2000cwe.googlegroups.com> References: <1161797141.981098.135130@i42g2000cwa.googlegroups.com> <87bqo0qlc5.fsf@ludovic-brenta.org> NNTP-Posting-Host: 80.97.184.174 Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" X-Trace: posting.google.com 1161812420 17022 127.0.0.1 (25 Oct 2006 21:40:20 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Wed, 25 Oct 2006 21:40:20 +0000 (UTC) In-Reply-To: <87bqo0qlc5.fsf@ludovic-brenta.org> User-Agent: G2/1.0 X-HTTP-UserAgent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; MSIE 6.0),gzip(gfe),gzip(gfe) Complaints-To: groups-abuse@google.com Injection-Info: e3g2000cwe.googlegroups.com; posting-host=80.97.184.174; posting-account=FDJXiA0AAAAevsasUuDe1JGQv3vHmfaA Xref: g2news2.google.com comp.lang.ada:7202 Date: 2006-10-25T14:40:12-07:00 List-Id: 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 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.