[Gambas-user] Slow Mysql connection

nando nando_f at ...1382...
Thu Aug 24 17:04:33 CEST 2006


I had a similar problem with MySQL
I had to add in the config file for no DNS search.
Even though DNS was setup, it added up to a 6 second delay.
-Fernando


---------- Original Message -----------
From: juanramon at ...1546...
To: "mailing list for gambas users" <gambas-user at lists.sourceforge.net>
Sent: Thu, 24 Aug 2006 17:04:40 +0200 (CEST)
Subject: Re: [Gambas-user] Slow Mysql connection

> Ok Benoit,
> 
> 1.-I connect to an external database via Internet. Is a Public Function in
> Modul :
> 
>   PUBLIC FUNCTION ConectarBase() AS Boolean
> 
>    IF MComun.Conectar <> NULL THEN RETURN FALSE
> 
>    MComun.Conectar = NEW Connection
>    WITH MComun.Conectar
>     .Host = "XX.XX.XXX.XXX" .-Static IP
>     .Name = "instore"
>     .Type = "mysql"
>     .Login = "XXX"
>     .Password = "XXXX"
>    END WITH
> 
>    TRY MComun.Conectar.Open()
>    IF ERROR THEN
>     MComun.Conectar = NULL
>     Message.Error("ERROR AL CONECTAR CON LA BASE DE DATOS")
>     RETURN TRUE
>    END IF
> 
>    RETURN FALSE
> 
>  END
> 
> 2.- I verify connection problems to enter de Database in FormMain:
> 
>   PUBLIC SUB Form_Open()
> 
>    ME.Center()
> 
>    IF MComun.ConectarBase() THEN
>       Message.Info("NO S'HA POGUT FER LA CONNEXIO")
>       RETURN
>    END IF
> 
>   END
> 
> 3.- Open Forms selecting in the Menu:
> 
>   PUBLIC SUB Caixeres_Click()
> 
>    DIM Caixeres AS FormCaixeres
> 
>    Caixeres = NEW FormCaixeres(ME)
>    Caixeres.Show()
> 
>   END
> 
>   One function for each option of the menu that opens a new form
> 
> Each form consists of a diferent DataSource connected to diferents tables
> of the DataBase and many “DataControls”
> 
> When I open a form for the first time goes very slow,  when opening for
> the second time it's a normal function.
> 
> Thanks,
> 
> > On Thursday 24 August 2006 14:07, juanra wrote:
> >> hi!!
> >>
> >> I'm working with a mysql connection, using many forms. All its ok but it
> >> works slowly.
> >> i connect to the database with the main form, then when i open some
> >> other form with datasources inside it, the form opens slooooowly, first
> >> then the second and all others opens quick.
> >> why???? can you help me.
> >>
> >> to open the form i use the code:
> >>
> >> PUBLIC SUB Caixeres_Click()
> >>
> >>   DIM Caixeres AS FormCaixeres
> >>
> >>   Caixeres = NEW FormCaixeres(ME)
> >>   Caixeres.Show()
> >>
> >> END
> >>
> >> yours faithfully Juanramon
> >>
> >
> > We can't read mind yet! :-)
> >
> > You must give full details about your application, and/or send your
> > project.
> > Did you put internet between your database and your gambas program?
> >
> > Regards,
> >
> > --
> > Benoit Minisini
> >
> >
> > -------------------------------------------------------------------------
> > Using Tomcat but need to do more? Need to support web services, security?
> > Get stuff done quickly with pre-integrated technology to make your job
> > easier
> > Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
> > http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
> > _______________________________________________
> > Gambas-user mailing list
> > Gambas-user at lists.sourceforge.net
> > https://lists.sourceforge.net/lists/listinfo/gambas-user
> >
> 
> -------------------------------------------------------------------------
> Using Tomcat but need to do more? Need to support web services, security?
> Get stuff done quickly with pre-integrated technology to make your job easier
> Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
> http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
> _______________________________________________
> Gambas-user mailing list
> Gambas-user at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/gambas-user
------- End of Original Message -------





More information about the User mailing list