[gtkada] Is Glib.Convert buggy?
Adrian Knoth
adi at drcomp.erfurt.thur.de
Sun Jun 16 18:44:42 CEST 2002
On Sun, Jun 16, 2002 at 12:11:20PM -0400, Stephen Leake wrote:
> > the 3rd entry (row in DB). After removing the calls to Locale_To_UTF8
> > is runs perfectly (but of course without converting the strings :)
> Is there a NULL database field in that record? just a guess.
There are some empty strings, but this is no problem for the first
three rows. The query-string is correctly written as '','abc','','f'...
And it always crashes in the 4th row. All data was read successfully
(I've checked this), the new INSERT-query has been correctly built
(Put_Line showed that) and an isolated construct like:
query := "INSERT INTO tmp_kunden values ('" & buffers(1) & "','"
& buffers(2) & "','"
& buffers(3) & "','"
& buffers(4) & "','"
& buffers(5) & "','"
& buffers(6) & "','"
& buffers(7) & "','"
& buffers(8) & "','"
& buffers(9) & "','"
& buffers(10) & "','"
& buffers(11) & "','"
& buffers(12) & "');";
Put_Line(To_String(query));
Put_Line("It worked until here");
helper := To_Ustring(utf8.To_String(query));
Put_Line("It's still working here");
sql.do_query(To_String(helper),ergebnis2);
clearly shows that Locale_To_UTF8 causes Interfaces.C.Strings.Deference_Error.
I don't know why. Does anybody of you have a working GtkAda-2.0 with
gnat-3.1x? I'm using the gcc-3.2 and perhaps it is a compiler-bug.
So I can provide a sample SQL-file, the sourcecode and someone can check
against gnat-3.14p if this problem is there, too.
--
mail: adi at thur.de http://adi.thur.de PGP: v2-key via keyserver
Unter NT gibt es keine Admins und Anwender, nur Luser. (Jonas Luster in dasr)
More information about the gtkada
mailing list