Re: Fwd: gasql questions



>     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.
>

The DSN field is to pass any needed information to the database, so you might add
USERNAME, PASSWORD and whatever you want, as long as this is understood by the
MySQL provider.

>
> > >     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.
> > >"""
> > >

Yes. Definitely, we should add the USERNAME and PASSWORD fields to the DSN, and do
what is said in the docs, that is, to use the user and passwd parameters, or if not
given, use the USER and PASSWORD in the DSN entry.

Chris, are you changing all this? (BTW, I should ask for a CVS account for you)


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