Re: Number of tuples in a Recordset



Vivien Malerba wrote:

> Hi!
>
> I know that with some servers, it is not easy to know the total number of
> tuples returned from a query, but (for speed reasons) I would like to have a
> function (from the client side) which returns the number of tuples or -1 if
> that number is too dificult to get from the server (in which case the client
> can still ask to move to the last tuple, then the first and compare).
>
> Would it be possible to add a function like this one to the corba interface of
> a recset?
>

I've found a way to do this without touching the IDL files, which is via the use
of GDA_Command_open (CORBA implementation). I've committed the changes in the
client lib, so the only thing missing is the postgres provider part. As I've seen
in the current code, you should add a "gulong *affected" parameter to
gda_postgres_cmd_execute(), and in impl_GDA_Command_open (in gda-postgres.c)
inform its "affected" parameter with the "affected" returned by
gda_postgres_cmd_execute().

Sorry if it's not very well explained, but I had written an hour ago a very good
explanation, but my netscape crashed when sending it, so I don't want (and can't)
repeat it again, so ask me whatever you don't understand.

Cheers



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