Page 1 of 1

A very basic mysql example

Posted: Thu Mar 21, 2013 12:19 am
by martingz
Juan Carlos
Leopoldo
Andres
Envio una aplicacion que podran ver como conectar al servidor de mysql, y su uso de inserts y update muy basicos pero suficiente para comenzar, lo del restaurant lo subire despues, gracias a algunos movimientos que hicieron nos dimos cuenta de unos pequeños detalles y estamos trabajando en ellos para poder entregar a tiempo la aplicacion

Nota, al compilar el proyecto, seguramente veran que cuando entran a la opcion de articulos, esta tarda demasiado y tiene un parpadeo molesto, esto lo medio soluciono con un truco que no se si sera lo mejor, pero tarda bastante menos tiempo, y no muestra el parpadeo.

en la linea 547 de h_grid.prg

*_HMG_DOGRIDREFRESH(I)
la cometamos para que no se compile, reconstruimos la libreria y listo, claro que despues de eso, tenemnos que poner manualmente un refres al grid en nuestros programas.

saludos


Google Translation
I send an application that will see how to connect to mysql server, and use of inserts and update very basic but enough to start, so I'll upload the restaurant later, thanks to some moves that did we realized a few details and are working on them to deliver on time the application

Note, when you compile the project, I will see that when they come to the choice of articles, this takes too long and has an annoying flicker, this half fix it with a trick that is not the best, but it took far less time, and
shows no flicker.

on line 547 of h_grid.prg

* _HMG_DOGRIDREFRESH (I)
the commit to not compile, rebuilt the library and ready, of course after that, we have to manually refresh the grid in our programs.

regards

Re: A very basic mysql example

Posted: Sat Jun 01, 2013 11:56 pm
by danielmaximiliano
Hola Martín : tarde pero seguro !!! :lol: voy a probar y cer tu aporte.

gracias por compartir ....

Re: A very basic mysql example

Posted: Mon Feb 22, 2016 2:40 am
by bels79
I try to connect to xampp , if we are using localhost can use the ip but could not. can you please help .

thank you

Re: A very basic mysql example

Posted: Mon Feb 22, 2016 4:40 am
by Rathinagiri
1. While loading data to a grid use
<Windowname>.<ControlName>.DisableUpdate()

and after that use

<Windowname>.<ControlName>.EnableUpdate()

2. You can use this too.

- <ParentWindowName>.<GridControlName>.PaintDoubleBuffer [ := | -->] lBoolean // Paints via double-buffering, which reduces flicker

3. If the number of rows in a grid runs to thousands you have to use virtual grid.

Re: A very basic mysql example

Posted: Wed Feb 24, 2016 11:57 am
by dragancesu
You have very little information and should not be a problem with the display
Navigation missing on forms, exist but without picture can not be seen
Look at a small example

Description
art.prg - form program for table articulo
mysqlfn.prg - functions work with database
config.ini - set connect parameters, host, database and user

and need libmysql.dll

Re: A very basic mysql example

Posted: Fri Feb 26, 2016 4:40 am
by bels79
I have 2 computers with ip 192.168.1.2 and 192.168.1.3
my xampp installed on the computer 192.168.1.2 .
I can run the program on the computer 192.168.1.2 .
whereas if there is an error of 192.168.1.3 "no connection to the server " .

if the browser ( firefox ) on both the computer it could be.

can you please help .

thank you

Re: A very basic mysql example

Posted: Fri Feb 26, 2016 2:05 pm
by dragancesu
What is conection string on both computers?

Re: A very basic mysql example

Posted: Fri Feb 26, 2016 3:26 pm
by serge_girard
Bels79,

You probably should connect your second PC by using real IP-address.
You can find your IP-address by https://www.iplocation.net/find-ip-address

Serge

Re: A very basic mysql example

Posted: Fri Feb 26, 2016 3:35 pm
by Rathinagiri
Is there any firewall obstructing the mysql port in both the computers? (usually 3306)

Re: A very basic mysql example

Posted: Fri Feb 26, 2016 5:00 pm
by dragancesu
When install webserver like wamp,xampp then often can access from localhost but not other ip address