Page 1 of 1

Phonebook code with MySQL database

Posted: Sat Jun 06, 2015 5:06 pm
by MigSoft
Hi,

Post code phonebook with MySQL database in http://migsoft.ml/2015/06/agenda-de-contactos-mysql

Re: Phonebook code with MySQL database

Posted: Sun Jun 07, 2015 7:00 am
by serge_girard
Thanks Miguel!

Serge

Re: Phonebook code with MySQL database

Posted: Sun Jun 07, 2015 7:10 am
by bpd2000
Thank you for sharing

Re: Phonebook code with MySQL database

Posted: Sun Jun 07, 2015 9:01 am
by esgici
May be more useful for us ( HMG users ) pure-HMG and English version :?

I'm sure something like this isn't difficult for you, Miguel :)

Happy HMG'ing :D

Phonebook code with MySQL database

Posted: Sun Jun 07, 2015 2:25 pm
by Pablo César
Yo en particularidad, no preciso otro idioma para admirar el código fuente o la técnica empleada y si lo considero útil. :)

Este tu ejemplo insentiva al uso de MySQL y eso es muy bueno para abrir cabezas... (me incluyo).

Gracias Daniel por tu aporte y me gustaria verlo funcionando en HMG tambien.

Un gran abrazo

Re: Phonebook code with MySQL database

Posted: Sun Jun 07, 2015 2:51 pm
by dragancesu
Nice, but

for an application of this type, when using only one table, the better solution is sqlite, everyone will work and only those who make the effort to raise mysql base

Re: Phonebook code with MySQL database

Posted: Sun Jun 07, 2015 4:25 pm
by Rathinagiri
Rightly said about SQLite. By the way, it is easy to convert to SQLite.

Re: Phonebook code with MySQL database

Posted: Sun Jun 07, 2015 11:08 pm
by danielmaximiliano
Gracias por compartir Miguel...

Re: Phonebook code with MySQL database

Posted: Wed Jun 10, 2015 2:40 pm
by nikko1960
thank you for sharing

a probably silly question :

if we need to connect to mariaDb in an another Pc connected via internet ( for example a pc far far away from ours ) which lines have to be changed ?

and / or wich driver we have to use

regards

domenico

Re: Phonebook code with MySQL database

Posted: Wed Jun 10, 2015 2:48 pm
by dragancesu

Code: Select all

*------------------------------------------------------------*
Function Main()
*------------------------------------------------------------*
    Local i := 0
    PUBLIC cServer := "localhost" /* this line is adress of server */
    PUBLIC cUser   := "root"
    PUBLIC cPaswd  := ""
    oServer := TMySQLServer():New( cServer, cUser, cPaswd )
    if oServer:NetErr()
        oServer := Nil
        msgstop( "Conexión no establecida","Error !!! ONE")
        Return Nil
    ENDIF
Adress can be symbolic like localhost, server1 or ip adress like 10.0.1.100, 192.168.1.155 or same
But server must enable remote connection