|
Migrate database to HFSQL |
Started by lbidi, Feb., 22 2018 7:05 PM - 5 replies |
| |
| | | |
|
| |
Registered member 18 messages |
|
Posted on February, 22 2018 - 7:05 PM |
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. |
| |
| |
| | | |
|
| | |
| |
Posted on February, 23 2018 - 1:12 PM |
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. |
| |
| |
| | | |
|
| | |
| |
Registered member 18 messages |
|
Posted on February, 23 2018 - 4:19 PM |
Ok Fabrice..
Thanks so much
Best regards |
| |
| |
| | | |
|
| | |
| |
Registered member 18 messages |
|
Posted on March, 08 2018 - 7:23 PM |
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 |
| |
| |
| | | |
|
| | |
| |
Posted on March, 08 2018 - 11:20 PM |
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 |
| |
| |
| | | |
|
| | |
| |
Registered member 18 messages |
|
Posted on March, 09 2018 - 2:00 PM |
Thanks Fabrice..
Try to do that and let you know.. |
| |
| |
| | | |
|
| | | | |
| | |
|