Re: gda_server_error_*



On Mon, Jul 24, 2000 at 10:40:50AM +0200, Rodrigo Moya wrote:
> 
> you should call the gda_server_error_make, which in turn adds the error
> to the list of errors for that connection, and then, this list is sent
> to the client, so you don't have to deal with the dialog box directly.
> This is done in the client-ui library.
> 
> > 2.) Can functions be added to get a list of the Gda_ServerConnection pointers
> >     matching a specific provider? With such a function, one could go through
> >     the list and compare the user specific data with data supplied in
> >     dbms lib's callbacks, having the ability to call more gda stuff then
> >     without such a function.
> >     E.g., together with 1.) you could use callbacks for error handling
> >     routines. In case of sybase, this would not only make the code smaller,
> >     but also more readable, reducing the thread of bugs.
> > 
> yes, that was the idea on making the Gda_ServerImpl a GtkObject. We can
> use callbacks for some things, but I don't understand very well what you
> mean.
>

I mean the following: Some dbms-client apis support user defined callbacks.
However, they missed a user-data parameter. Hence, you have no
Gda_ServerConnection * pointer to use for gda_server_error_new,
never getting a Gda_ServerError * pointer. So, you cannot send an error
message to the server using these programming easing features of the
dbms client api.
However, i don't think the workaround keeping pointers of all
Gda_ServerConnection *'s of the provider globaly would not be
a good solution. 

In conclusion, i'd greatly appreciate a function which can either return
a GList of all Gda_ServerConnection s to the provider (and it can pick
out the correct Connection by comparing the cnc user_data).
or a functionset which can pass error messages as gchar * to the server
library.

> > I started the hardcoded way of handling error messages, using ct_diag()
> > and cs_diag(). It's an nightmare, that function! :-( Now the c[st]_diag()

Ciao,

  Holger
-- 
Operator excuse of the instant:
The cord jumped over and hit the power switch.




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