PC SOFT

FOROS PROFESIONALES
WINDEVWEBDEV y WINDEV Mobile

Inicio → WINDEV 2024 → Changing Automatic ID to numeric
Changing Automatic ID to numeric
Iniciado por guest, 02,ago. 2017 09:30 - 3 respuestas
Publicado el 02,agosto 2017 - 09:30
I recently developed a WD20 app for a client. In development I used HF Classic but the client is using HF C/S. Everything went fine and it has been running well for a couple of weeks now.
Yesterday they decided that a field in one file should just be numeric instead of an autoID.
No big deal I thought. I modified the file on my machine, tested the program and everything worked as expected... until I tried updating the file on the client's server. First I tried just copying my file (fic and ndx) to the server. Nope - the field was still an autoID.
Next I copied my .wdd file to their server and in HFSQL Control Center I ran Synchronizing the database but it still didn't change.
What am I missing?
Garry
Publicado el 02,agosto 2017 - 13:54
Hi Garry,

you are missing 2 things:

1. you cannot modify the analysis and not modify the exe coming with it. So you will need to install an update of your program at your customer, otherwise, the program doesn't know that you made a change in the files.

2. If you use the standard installer, you can just check the "automatic modification of data structure" checkbox and the customer file will be changed from auto ID to numeric (or any other analysis change). If you don't use the standard installer, you can instead add a hchangestructure at the beginning of your code

Finally, I strongly advise that you do NOT do your testing against the real customer DB/setup.

Instead, install in your office on a separate machine a copy of the customers data (if possible) and the program itself, then before installing a new version at your customer, install it there and test that everything is okay.

This will help you discover other things that you are currently missing and don't know about BEFORE you arrive at the customers and crash his database.

Best regards
Publicado el 02,agosto 2017 - 17:31
Hi Garry,

Maybe i miss something but why change an autoID (numeric) into a 'notAutoID' numeric field.
Why not keeping the AutoID and add a new numeric field ?

The AutoID is very usefulI for modifying records. It's never changing...
Publicado el 03,agosto 2017 - 15:42
Hi Fabrice
I forgot to mention that I recompiled the program and copied it to their server, however I did not use the standard installer.
Yes, testing was done on my machine with a COPY of the client's data.

I searched the help for hchangestructure but came up with no results. I did find hmodifystructure however I don't understand where it gets its info from or what it does.

If I run WDModFic on the server it always comes up in French (WDModFix -wizard /US doesn't seem to work) and asks for a .wdd which I assume is the latest from my development machine. It reports an error which, if my French is correct, says that RBL_Guide.fic is not in WinDev20 format but when I look at it's properties it says HFCS C/S.

Harry W: Yes, I agree but just changing it seemed like the simplest solution at the time.