Ron_1st ha scritto: > 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 >
Thanks for you answer. But I would tell that in several other parts of my program I open two connections named Connessione1 and Connessione2 and I work with them simultaneously without problems. Only in the example I open the second one just after I made some work on the first one, and got the error. -- Ciao. Leo. Web: www.leonardomiliani.com E-mail: [EMAIL PROTECTED] Scegli software opensource - Choose opensource software Co-fondatore di Gambas-it.org Il sito di riferimento della comunità italiana degli utenti di Gambas www.gambas-it.org ------------------------------------------------------------------------- This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK & win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100&url=/ _______________________________________________ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user