PC SOFT

FOROS PROFESIONALES
WINDEVWEBDEV y WINDEV Mobile

Inicio → WINDEV 2024 → Migrate database to HFSQL
Migrate database to HFSQL
Iniciado por Leonardo Bidi, 22,feb. 2018 19:05 - 5 respuestas
Miembro registrado
18 mensajes
Publicado el 22,febrero 2018 - 19:05
Hi all.

I am trying to move old software and its database to Windev and HFSQL. I've have two conecctions, one for the old one with ole db and a new one to HFSQL. I want to obtain all the tables and their structures so I can then recreate them in the new connection. I assume its possible because the wizard when creating a new analisys does it, but wants to do it in my final client. How can I do that ?

Many thanks.
Publicado el 23,febrero 2018 - 13:12
Hi,

there are 2 parts in your problem:
- the analysis/structure of the DB
- the content/data of the DB


The fist part needs to be done in the analysis editor, there is no other
choice.

The second part, ie getting the data from the old DB and writing it in
the HFSQL DB with the same structure can be done any time, just by
reading on one side and writing on the other...

So you can code a generic process by using hlistfile to list all the
files to process, and then generic loops on these files

Best regards

--
Fabrice Harari
International WinDev, WebDev and WinDev mobile Consulting

Ready for you: WXShowroom.com, WXReplication (open source) and now WXEDM
(open source)

More information on http://www.fabriceharari.com

Le 2/22/2018 à 1:05 PM, lbidi a écrit :
Hi all.
I am trying to move old software and its database to Windev and HFSQL.
I've have two conecctions, one for the old one with ole db and a new one
to HFSQL. I want to obtain all the tables and their structures so I can
then recreate them in the new connection. I assume its possible because
the wizard when creating a new analisys does it, but wants to do it  in
my final client. How can I do that ?
Many thanks.
Miembro registrado
18 mensajes
Publicado el 23,febrero 2018 - 16:19
Ok Fabrice..

Thanks so much

Best regards
Miembro registrado
18 mensajes
Publicado el 08,marzo 2018 - 19:23
Fabrice, I recreate the tables in my new analisys with one connection to my old db and one to the new HF.

How can I read the records in any old table and then insert it in the new one ?
Must be done field by field ?
Can you give me a little example ?

Thanks so much.

Best regards
Publicado el 08,marzo 2018 - 23:20
Hi

quick and dirty pseudo code done without checking anything... will
create compiling errors
hlistfile to list the files then

then for each file listed, use :

hreadfirst(filename)
while not hout(filename)
hcopyrecord(fileName,newfilename)
hadd(newfilename)
hreadnext(filename)
end

to copy the record (it's not the only method, but it's very simple)
that's all

best regards

--
Fabrice Harari
International WinDev, WebDev and WinDev mobile Consulting

Ready for you: WXShowroom.com, WXReplication (open source) and now WXEDM
(open source)

More information on http://www.fabriceharari.com

Le 3/8/2018 à 1:23 PM, lbidi a écrit :
Fabrice, I recreate the tables in my new analisys with one connection to
my old db and one to the new HF.

How can I read the records in any old table and then insert it in the
new one ? Must be done field by field ? Can you give me a little example ?

Thanks so much.

Best regards
Miembro registrado
18 mensajes
Publicado el 09,marzo 2018 - 14:00
Thanks Fabrice..

Try to do that and let you know..