[Gambas-user] Extracting fields from a Result

Doug Hutcheson owlbrudder at gmail.com
Tue Jan 2 23:56:04 CET 2018



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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.gambas-basic.org/pipermail/user/attachments/20180103/ac9ff305/attachment.html>


More information about the User mailing list