Re: [gnome-db] gda_connection_execute_select_command and one column



Piotr Pokora ha scritto:

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?

If my approach is bad, which one is correct?
Just check how many rows the query returned before trying to access 'em.

Think the model creation as a 2-step process: first it gets initialized by the columns definitions, *THEN* it gets filled by the actual rows returned (if any). Even if you run your query in the interactive command processor (psql for Postgres, don't know what's for MySql), when you run a query you always get an header, even when there are no rows selected.

HIH

BYtE,
 Diego.




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