Re: [gnome-db] a question about providers



On Fri, 2002-03-22 at 00:53, mr mike wrote:
> Hello all!
> 
> I'm in the middle of writing the sybase provider and I have a question. 
> When I get a result set from sybase, I use this function to create a
> server record set:
> 
> recset = gda_server_recordset_new (cnc, 
>                                    syb_fetch_func, 
>                                    syb_describe_func);	
> 
> After creating the recordset, syb_fetch_func is called, as one would
> expect.  My question is how does libgda know how many times to call
> syb_fetch_func? (in the postgres provider, the function is called
> fetch_func)
> 
you must return NULL when no more rows. When there is an error, you do
the same, with the difference that when there is an error, you add an
error to the connection (gda_server_connection_add_error), and when
there are no more rows, you don't add any error.

cheers
-- 
Rodrigo Moya <rodrigo gnome-db org> - <rodrigo ximian com>
http://www.gnome-db.org/ - http://www.ximian.com/



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