Re: [gnome-db] gda_connection_execute_select_command and one column
- From: Piotr Pokora <piotrek pokora gmail com>
- To: Diego Zuccato <diego otello alma unibo it>
- Cc: gnome-db-list <gnome-db-list gnome org>
- Subject: Re: [gnome-db] gda_connection_execute_select_command and one column
- Date: Thu, 15 May 2008 15:28:50 +0200
Diego Zuccato writes:
>> If there's no row and at least one column, then
>> gda_data_model_get_value_at seems to be a "bit of luck" function.
> Why? You simply shouldn't be using it on a row that doesn't exists...
SELECT x FROM table WHERE y=n which returns field's value.
How many rows and how many columns is returned for such query?
How exactly gda_data_model_get_value_at should be invoked for returned
model? Should I specify 0 or 1 row there? Assuming that there's header?
This is GDA with debug flag:
COMMAND> SELECT id FROM article WHERE guid =
'e52d944e228111dda57ac16a7e76bb9abb9a' AND sitegroup = 0 (Provider MySQL
on cnx 0x8729d90)
EVENT> NOTICE: (1 row) (on cnx 0x8729d90)
*1* row.
And my own message:
g_warning(" (%d::%d) ", gda_data_model_get_n_rows(model),
gda_data_model_get_n_columns(model));
With the output:
(WARNING): (1::1)
There's no place for additional header.
And what exactly should be in model if rows could be 0 and columns 1?
Piotras
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]