[Gambas-user] Extracting fields from a Result

Doug Hutcheson owlbrudder at gmail.com
Wed Jan 3 00:42:00 CET 2018



On Wed, 2018-01-03 at 08:56 +1000, Doug Hutcheson wrote:
> On Tue, 2018-01-02 at 11:41 -0500, T Lee Davidson wrote:
> > On 01/02/2018 12:18 AM, Doug Hutcheson wrote:
> > > Hi Lee. Nope, it does not help with the Connections problem. My
> > > Connections tool correctly shows all my tables and browses my
> > > data, but attempting to use a Connection with a Datasource
> > > control and giving it a tablename visible in the Connections
> > > tool,
> > > causes the error "Cannot open database: fe_sendauth: no password
> > > supplied".
> > 
> > It's not just PostgreSQL. It happens to me with and IDE-defined
> > MySQL Connection.
> > 
> > When I run a simple test program, I get, "Cannot open database:" -
> > no reason given. I believe that error message, in the case of
> > MySQL, is generated by line 775 of gb.db.mysql.
> > (https://gitlab.com/gambas/gambas/blob/master/gb.db.mysql/src/main.
> > c#L775)
> > 
> I agree - that seems to be the line. (Takes note to self: must learn
> how to use gitlab ...) The corresponding line in the gb.db.postgresql
> source is 720, although the surrounding code is quite different.
> Still, both must have been working (?) so the mission is to discover
> what has changed.
> 
> > The 'Local variables' tab shows "hConn (Connection 0xss6faa8)".
> > Examining that object by double-clicking it shows that the
> > Password property is empty.
> > 
> That is consistent with what is happening for me, but I had not gone
> as far as debugging the hConn variable.
> 
> So, there are two issues to address:
> 1. Why are PostgreSQL table and column names not recognised if mixed
> case - probably not being double quoted even though the code is
> there?
> 2. Why are passwords not being passed?
> 
> At least we are both seeing identical problems, so I can eliminate my
> own setup as being at fault.
> 
> 
> Gambas is a big beast to get the head around, but the code is
> beautifully written which makes it possible to follow the logic in
> most cases. As is always the case, I wish there were more
> comments.   '8-)
> 
> Kind regards, Doug

Hi Lee. An interesting piece of code resides in
main/lib/db/CConnection.c lines 315 to 337, which is surrounded by
#ifdef 0 ... #endif and attempts to set a flag indicating whether the
database in question is case sensitive. Clearly the ability for
databases to have identifiers in mixed case has received attention in
the past. My understanding of #ifdef 0 is that it will always fail, so
the code is never included - do you agree? I can't imagine a case where
one would #define 0, but I am willing to be proved wrong    "8-)
Is there a better way to collaborate than sending emails to the list?
I'm sure other users must be getting sick of the constant flow of
messages.
Kind regards, Doug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.gambas-basic.org/pipermail/user/attachments/20180103/306518f4/attachment.html>


More information about the User mailing list