MySql revisited

General Help regarding HMG, Compilation, Linking, Samples

Moderator: Rathinagiri

User avatar
koke
Posts: 25
Joined: Wed Aug 21, 2013 3:54 pm
Has thanked: 1 time
Been thanked: 5 times

Re: MySql revisited

Post by koke » Mon Aug 14, 2017 4:24 pm

Hi dragancesu,
I try connecting to a database on a linux server but i couldn't i think it's because you convert to lower case te name of the database and on linux the uppercase has to be respected could you make the changes on your code please for me to be able to check it.
Thankyou.

Hola dragancesu,
Intento conectar con una base de datos en un servidor del linux pero no pude pienso que es porque usted convierte a minúscula el nombre de la base de datos y en linux la mayúscula tiene que ser respetada usted podría hacer los cambios en su código por favor para poder probar el programa.
Gracias.
,___,
[O.o]
/)__)
-”–”-
KoKe

User avatar
dragancesu
Posts: 461
Joined: Mon Jun 24, 2013 11:53 am
DBs Used: DBF, MySQL, Oracle
Location: Subotica, Serbia
Has thanked: 3 times
Been thanked: 67 times

Post by dragancesu » Mon Aug 14, 2017 6:44 pm

I'm glad someone reads and teach mysql

This is all done for Windows, but I believe someone else uses the linux and will help you

Can you write which code is your real problem

User avatar
dragancesu
Posts: 461
Joined: Mon Jun 24, 2013 11:53 am
DBs Used: DBF, MySQL, Oracle
Location: Subotica, Serbia
Has thanked: 3 times
Been thanked: 67 times

Post by dragancesu » Tue Aug 15, 2017 10:42 am

Every developer wants a quick result

This is one way to quickly load data from dbf to mysql database

Compile import_dbf and run

Choose dbf and be create the program impDbfName.prg

Compile impDbfName.prg and run

p.s. Mysqlfn.prg is a program with functions for connecting with mysql

Libmysql.dll is required to run the program, this or your version
Attachments
import.zip
(948.09 KiB) Downloaded 43 times

User avatar
serge_girard
Posts: 1871
Joined: Sun Nov 25, 2012 2:44 pm
DBs Used: 1 MySQL - MariaDB
2 DBF
Location: Belgium
Has thanked: 293 times
Been thanked: 67 times
Contact:

Post by serge_girard » Tue Aug 15, 2017 11:47 am

Great Job Dragan ! Thanks, Serge

User avatar
dragancesu
Posts: 461
Joined: Mon Jun 24, 2013 11:53 am
DBs Used: DBF, MySQL, Oracle
Location: Subotica, Serbia
Has thanked: 3 times
Been thanked: 67 times

Post by dragancesu » Mon Aug 21, 2017 8:08 am

Here it was said about MySQL database, access through HeidiSQL, and finally data load

Did anyone try and help him? Are you satisfied with the instructions?

claudiotedesco
Posts: 132
Joined: Thu Jul 31, 2008 12:05 pm

Post by claudiotedesco » Tue Aug 22, 2017 11:36 am

Hola, muy bueno el tutorial.
Estuve realizando las practias y funcionan.
Mi consulta es la siguiente: ¿Cómo hacer el bloqueo de registros en MySql? es decir cuando un usuario esta modificando un registro y otro quiere acceder a dicho registro, cómo indicarle que esta en uso?
Gracias
Claudio

Hi, very good tutorial.
I was doing the practices and they work.
My query is: How do I lock records in MySql? when a user is modifying a record and another wants to access such a record, how to indicate that it is in use?
Thank you
Claudio

User avatar
dragancesu
Posts: 461
Joined: Mon Jun 24, 2013 11:53 am
DBs Used: DBF, MySQL, Oracle
Location: Subotica, Serbia
Has thanked: 3 times
Been thanked: 67 times

Post by dragancesu » Tue Aug 22, 2017 11:50 am

In principle, it is not necessary to lock the tables, it works the database, when a COMMIT is made, the change is written

On the other hand, the question is what the other user sees, see the result of the last SELECT, if user thinks that the change has to be repeated by SELECT and that's all

When a base is used then the organization is different, someone enters the data, someone is watching the reports, as soon as the data is entered and saved, it will be visible to the new report

User avatar
Rathinagiri
Posts: 5173
Joined: Tue Jul 29, 2008 6:30 pm
DBs Used: MariaDB, SQLite, SQLCipher and MySQL
Location: Sivakasi, India
Has thanked: 136 times
Been thanked: 131 times
Contact:

Post by Rathinagiri » Tue Aug 22, 2017 1:27 pm

If you necessarily want to lock the database/table/records, you can begin a transaction as 'EXCLUSIVE'. In that way, others can not 'select' any table or run any query.
East or West HMG is the Best.
South or North HMG is worth.
...the possibilities are endless.

User avatar
mol
Posts: 2856
Joined: Thu Sep 11, 2008 5:31 am
Location: Myszków, Poland
Has thanked: 125 times
Been thanked: 65 times
Contact:

Post by mol » Tue Aug 22, 2017 2:05 pm

Some years ago I've tries record locking in mysql table. The same program worked ok on one computer, on the another record locking didn't work. The same version of mysql installed.
So I've left it.

User avatar
BeGeS
Posts: 89
Joined: Fri Jul 14, 2017 10:45 am
DBs Used: DBF
Location: La Mancha, Spain
Has thanked: 17 times
Been thanked: 17 times

Post by BeGeS » Tue Aug 22, 2017 2:38 pm

I do not understand anything.
Regardless of the language or database type, a record must be blocked for modification. Otherwise, two users could modify it at the same time and the data of the last one would save the record.
And blocking the whole database to add a phone number, for example, seems excessive.
I get by with a little help from my friends

Post Reply