Re: Fwd: gasql questions
- From: Joe Williams <jwilliam cs iupui edu>
- To: gnome-db-list gnome org
- Subject: Re: Fwd: gasql questions
- Date: Mon, 27 Mar 2000 22:03:11 -0500 (EST)
> Yes, there definitely should be a way to specify that info. Hmm.......you
> probably *could* put the username and password into the FLAGS section (ie.
> FLAGS=-u username -p password), however, a) I'm new to the code, and b) I'm
> at work, or I'd get into it and do a little debug, and c) that's probably a
> BAD way to do that. When I get home tonight I'll take a look at the code
> and probably make a patch to start fixing the mysql provider.
Seems easier to just introduce two more keys "USERNAME" and "PASSWORD"
which are checked. The DSNs aren't standardized anyways, correct? That fix
is pretty easy and can be incorporated into the code near the area I pointed
out below.
Joe
> > Unfortunatly, it looks like gda_open_connection is broken. It's
> >pulling the username and password from the Gda_MYSQL_Connection structure,
> >and it *appears* that the username and password fields are never initialized
> >anywhere. A *completetly untested* fix is thus:
> >
> >gda-mysql-server/gda-mysql-connection.c, line 218, insert:
> >
> > cnc->user = g_strdup(user);
> > cnc->password = g_strdup(passwd);
> >
> > Which will allow you to specify the username/password at the login
> >dialog. But there is still a question, the docs for gda_connection_open say:
> >
> >"""
> > If user or pwd is not NULL, it will overwrite the appropriate entry in the
> > DSN passed as par2. Entries in the DSN have the form = seperated
> > from the database name . Currently the DSN is not parsed.
> >"""
> >
> > Currently there is no way to specify a username/password in the DSN
> >for MySQL, should there by, like the docs above suggest?
> >
> > Joe
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]