[Gambas-user] Maybe a bug in how Gambas manages open DB connections
Ron_1st
ronstk at ...239...
Mon Sep 8 02:13:20 CEST 2008
On Sunday 07 September 2008, Leonardo Miliani wrote:
> Benoit Minisini ha scritto:
> > On vendredi 05 septembre 2008, Leonardo Miliani wrote:
> >> Ops.... I forgot the version: 2.8.1, but got the same error with
> >> previous versions 2.8 and, if I remember correctly, 2.7.
> >
> > Then please post the actual code that shows your problem.
> >
> > Thanks.
> >
>
> English is not my native language so maybe I can not explain the problem
> very well.
> But it's very easy to understand (don't think at the code, now: just
> think in "pseudocode" or logical steps):
>
> 1) I open a connection named C1
> 2) I get some results from it
> 3) I open a new connection named C2
> 4) Just after the point 3), if I try to get some other results from C1,
> I get the error the the C1 is not a valid object. I must call another
> MySQL query (even with C1.Find or C1.Execute or whatever I want) before
> to look for a result.
>
> I send the complete form (class and gui) that give me the error: not the
> complete project (toooooo big, several MBs), not the original DB (tooo
> big...).
>
When I did understand right in the past the mysql access is asynchroon.
This means before the C!.exec it connects and after it it disconnect
leaving no open connections, only the result is hold.
When you make the C2 connection maybe the C1 connection is destroyed.
This because i think you use the exact same property values.
Try with another user name for C2, then mysql knows they are different
For the connection the main properties are 'use', 'password', 'server', 'port'.
Less importand are the 'database' and 'table'
The wrong thing I see is that all those properties are put together on the connection.
I should have 1 connection and across that same connection be able to
access several databases and tables in them.
I'm not sure that this is true in gambas.
Seen from the mysql server it gets request from 2 equal sources, the different gambas
connections are the same for the TCP connection.
There is no unique identification sign they are differnt in the TCP connection.
It could be the 'user'/'password'
So the asynchroon close from the C@ connection kills someway C1 also. I think.
Just guessing this is the problem.
Best regards
Ron_1st
--
A: Because it messes up the order in which people normally read text.
Q: Why is top-posting such a bad thing?
A: Top-posting.
Q: What is the most annoying thing in e-mail?
More information about the User
mailing list