comp.lang.ada
 help / color / mirror / Atom feed
From: Ludovic Brenta <ludovic@ludovic-brenta.org>
Subject: Re: mysql , gnade and function hanging
Date: Wed, 30 Jun 2010 14:20:46 +0200
Date: 2010-06-30T14:20:46+02:00	[thread overview]
Message-ID: <87bpasiue9.fsf@ludovic-brenta.org> (raw)
In-Reply-To: 9e8008e5-129f-4b9b-b083-44b386a7ce4b@i28g2000yqa.googlegroups.com

tonyg writes on comp.lang.ada:
>>>> On 30 June, 09:34, tonyg <tonytheg...@googlemail.com> wrote:
>>>>> I am calling this gnade function in the mysql package to get some
>>>>> debug info
>>>>>
>>>>> Put_Line(To_String(String_Field (TheDatabase, TheHeaterQuery, 1)));
>>>>>
>>>>> it unfortunately hangs though and the task stops
>>>>>
>>>>> I am thinking perhaps the whole task has either hung or terminated
>>>>> without telling me.
>>>>>
>>>>> Would gnat tell me if this task had crashed?
>>>>
>>>> I put the code in a straight procedure and I get a constraint error
>>>> which is
>>>>
>>>> raised CONSTRAINT_ERROR : gnu-db-mysql.adb:883 invalid data
>>>>
>>>> I am wondering what field types are good to use in a ada mysql
>>>> database connection and what I am doing wrong here - has anybody any
>>>> ideas ?
>>>>
>>> Looking at gnu-db-mysql.adb:883 (for gnade 1.6.1 or 1.6.2) indicates
>>> that your variable TheHeaterQuery is not initialized.
>>>
>>> --
>>> Ludovic Brenta.
>>
>> Do you have some example code I can take a look at that retrieves a
>> string from a database?
>
> btw I use the Nbr_Of_Rows function and I get an answer of 2 which
> indicates that the query has operated and retrieved the data correctly
> and I try the query out in the mysql query browser to make sure the
> query works so I do think the query has correctly initialised but its
> when I go to access the string that things fall over. But I am very
> confused about this problem as well ...

The closest thing to an example is the documentation in
gnu-db-mysql.ads; have you read it?  In particular, the Query_ID must be
the result of calling Query and the Query_ID must not have been dropped.

Without your full sources it is very difficult to diagnose your problem
any further.  From what you say, I have a hunch that maybe you issue the
query in one task and then try to use it in another task?  Don't do that
:)

-- 
Ludovic Brenta.



  reply	other threads:[~2010-06-30 12:20 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-06-30  8:34 mysql , gnade and function hanging tonyg
2010-06-30  9:00 ` Ludovic Brenta
2010-06-30  9:03 ` tonyg
2010-06-30  9:23   ` Ludovic Brenta
2010-06-30  9:29     ` tonyg
2010-06-30  9:40       ` tonyg
2010-06-30 12:20         ` Ludovic Brenta [this message]
2010-06-30 12:53           ` tonyg
2010-07-01  9:44             ` Ludovic Brenta
2010-07-01 10:19               ` tonyg
2010-07-01 13:38               ` J-P. Rosen
2010-07-02  8:45                 ` tonyg
     [not found]                   ` <zOmdnev0COPcfLPRnZ2dnUVZ_hMAAAAA@earthlink.com>
2010-07-03 10:07                     ` Dmitry A. Kazakov
2010-07-05  9:18                       ` tonyg
2010-07-01 11:38   ` Stephen Leake
replies disabled

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