Re: [gnome-db] gda_connection_execute_select_command and one column



Piotr Pokora ha scritto:
Diego Zuccato writes:
There's no row in model but there's one column.
I suppose there should be at least one row if there's at least one
column.
Why?
Because it's 2D model and must have x and y :)
Nope. Y (rows) could be 0 even if X is greater than 0.
Try "SELECT * FROM a_table_in_your_db WHERE false".
It returns a model w/o rows. But column descriptions are there.

when you run
a query you always get an header, even when there are no rows selected.
I really doubt gda returns header. What you talk about is provider's ui
specific. But, if gda really returns header I must missed it in docs.
I did not say *gda* returns the header. I said the backend does.
It first parses the query, gets the expected column names and their types, sends 'em to the frontend w/ other infos (like number of rows), then sends each row (more or less... it might even send NO data until further requests, to avoid sending all the records when the FE is not interested, or just send an iterator).

Anyway. SQL query is *correct*. Execution ( manual ) *returns* field's
value. Why I can not ( or how should I ) get it with GDA and
execute_select_command?
There might be a lot of explanations. Most probably, seen your later mail, there's something wrong in your setup.
Try using a clean install (no Debian package, just a clean compile).

BYtE,
 Diego.



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]