Re: Number of tuples in a Recordset



On mer, 09 fév 2000, Rodrigo Moya Piernavieja wrote:

> 
> I think I've found the solution to the first problem, since I just updated my local
> copy with your changes and found errors in gda-postgres-connection.c: 'too few
> arguments in call to gda_postgres_cmd_execute()'...
> 

You should not have any problem compiling the postgres provider. For me
everything is OK (I rechecked all the calls to gda_postgres_cmd_execute() and
found that all had been modified!). Anyway if you still have problems to
compile, tell me. BTW I've just released a new revision of that file which
limits the number of returned types (only the ones I find usefull, which can be
discussed of course).

> About the difference between a recordset with 0 tuples and a provider not being able
> to tell how many rows it's got: we can just leave as it is (returning 0) and
> specifying that you cannot rely on this value, or return -1 to make the difference,
> but this will be the same as an error (by convention, all functions returning gint's
> return -1 in case of error), so we can return -2 (or whatever). So, what do you
> think? I'd vote for the first solution (not very elegant I know).

That's the only solution since Gda_Recordset->affected_rows is gulong. Maybe is
it time to introduce a new kind of function to learn about the limitations of
the provider. I mean there WILL be some other cases like this one and as you
say leaving it like that is not an elegant solution. So why not do it now? Tell
me what you think about this.

Cheers

Vivien



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