Migrate from HFSQL Client/Server database to MySQL

AntoineSam Posted messages 1 Status Membre -  
DandypunkII Posted messages 70 Status Membre -
Hello everyone!
I just joined the community hoping to benefit from it!
I developed a business management application in Windev 18 with a HyperFile Client/server database. We've been using that for a while (6 months), and now I want to change the database and migrate to MySQL while preserving the existing data. I duplicated the tables in the analysis and linked them to two connections, but I no longer know how to retrieve the existing data. Can anyone help me?

Best regards,

1 réponse

DandypunkII Posted messages 70 Status Membre
 
Hello,
At first glance, you need to look towards HOuvreAnalyse, HListeFichier for each of the 2 analyses, associated with HListeRubrique and with good redirections, you can make a sequential copy of each table possibly passing through a buffer.

https://doc.pcsoft.fr/fr-FR/?3044045=&name=hlistefichier_fonction

The tool you were thinking of is WDConver, but it only works in the direction Non HFSQL Database ---> HFSQL Database (at least up to Windev 20.)

On the fly, your script should look like this (syntax to complete)

 HOuvreAnalyse(AnalyseHFCS.....) sFichierHFCS=HListeFichier(AnalyseHFCS.....) sFichierMySQL=sFichierHFCS //In principle, the structure is the same FOR EACH sNomFichier IN sFichierHFCS separated by RC sChamps=HListeRubrique(sNomFichier.....) fCrée (buffer.txt) HOuvreAnalyse(AnalyseHFCS...) FOR i=1 _A_ HNbEnr(sNomFichier)//We are going to put the records of the file into a buffer HLitClient(sNomFichier,i) FOR EACH sNomRubrique IN sChamps Separated by RC fAjouteTexte(buffer.txt,{sNomFichier}.{sNomRubrique}+RC) END END HOuvreAnalyse(AnalyseMySQL...) // We are going to transfer the records nIDFichier=fOuvre(buffer.txt) FOR EACH sNomRubrique IN sChamps separated by RC {sNomFichier}.{sNomRubrique}=fLitLigne(nIDFichier) END END 


NB: Given the hour, there are likely some errors, but I think the idea is there

If it's simple, it's Windev.
0