Welcome! Log In Create A New Profile

Advanced

Changing Automatic ID to numeric

Posted by Garry Allen 
Garry Allen
Changing Automatic ID to numeric
August 02, 2017 09:30AM
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
Fabrice Harari
Re: Changing Automatic ID to numeric
August 02, 2017 01:54PM
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
Harry W
Re: Changing Automatic ID to numeric
August 02, 2017 05:31PM
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...
Garry Allen
Re: Changing Automatic ID to numeric
August 03, 2017 03:42PM
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.
Author:

Your Email:


Subject:


Spam prevention:
Please, enter the code that you see below in the input field. This is for blocking bots that try to post this form automatically. If the code is hard to read, then just try to guess it right. If you enter the wrong code, a new image is created and you get another chance to enter it right.
Message: