|
| [WM17] - Duplicate ID error in HFSQL Classic |
| Iniciado por guest, 09,sep. 2016 17:23 - 9 respuestas |
| |
| | | |
|
| |
| Publicado el 09,septiembre 2016 - 17:23 |
Hello,
In a software that was running properly for a year. Now all of a sudden it has started giving this error.
The file in question has only 5218 rows in all.
Here is the Debug dump: What happened? Duplicates found for key on file. Error code: 70010 Level: non-fatal error (EL_ONRETURN) WD55 error code: 10 Dump of the error of 'WD170HF.DLL' module (17.0.161.3). Identifier of detailed information (.err): 70907 Debugging information: IEWDHF=30.18 Module= Version=<17.0.161.3> Additional Information: EIT_LOGICALTABLENAME : EIT_ITEMNAME : EIT_PATHFIC : EIT_PATHNDX : I am also attaching screen shot of the exception as shown by WD. [attachment 2144 2016-09-09_204731.jpg]
Please help solve this problem.
TIA
Yogi Yang |
| |
| |
| | | |
|
| | |
| |
| Publicado el 09,septiembre 2016 - 20:01 |
Hi
two possible cases:
1. Your code is creating the problem by using hadd/hmodify with hfixedautoID or hForceAutoID options when you shouldn't (most of the time)... It's possible but I doubt it
2. There is an OS/Hardware problem: - if it's a SHARED directory HF classic, then most probably you have an oplock problem - if you are using HF Classic only on a local machine, then you have one of the following problem: power, hard drive, RAM, etc
In both case, you need to FIRST find out the cause of the problem so as to eliminate it then solve it by adding a record with hforceautoID option with a grater file ID that the biggest one used, then by deleting this record
Best regards |
| |
| |
| | | |
|
| | |
| |
| Publicado el 10,septiembre 2016 - 07:05 |
Hello Fabrice,
Thanks for your inputs. None of what you have said seem to apply. I have never used anything like hfixedautoID or hForceAutoID in my code. In fact I don't such features exist in WD. 
As you may have observed the last row id is 5220.
I also tried to add a row manually in WDMap. The row get added but the row id remained the same. I even reindexed the files also. All files. I have not set any constrains anywhere in the whole analysis.
Here is a screen shot of WDMap with a new row added manually. Observe the Row ID [attachment 2145 2016-09-10_102542.jpg]
Finally here is the code of structure of file in question along with related files: -- Script generated by WinDev on 10/09/2016 10:32:45 -- Tables of aLiveFotoPrintManager.wda analysis -- for Generic SQL (ANSI 92) -- Creating the job_work table CREATE TABLE "job_work" ( "jw_id" INTEGER PRIMARY KEY , "jw_num" VARCHAR(15) , "jw_date" DATE , "jw_delivery_date" DATE , "jw_job_stage_id" INTEGER , "jw_dealer_id" INTEGER , "jw_customer_id" INTEGER , "jw_item_id" INTEGER , "jw_size_id" INTEGER , "jw_paper_id" INTEGER , "jw_lamination_id" INTEGER , "jw_cover_pad_id" INTEGER , "jw_description" LONGVARCHAR , "jw_pages" INTEGER , "jw_machine_id" INTEGER , "jw_sub_products" LONGVARCHAR , "jw_remarks" LONGVARCHAR , "jw_job_status_id" INTEGER , "jw_item_type" INTEGER , "jw_inward_mode" VARCHAR(150) , "jw_delivery_time" TIME , "jw_billed" BIT , "ProductOptions" INTEGER , "jw_estimated" BIT , "jw_time" TIME , "jw_series_master_id" INTEGER , "jw_delivered" BIT , "jw_IsCancel" BIT , "jw_IsRejected" BIT ); CREATE INDEX "WDIDX_job_work_jw_num" ON "job_work" ("jw_num"); CREATE INDEX "WDIDX_job_work_jw_date" ON "job_work" ("jw_date"); CREATE INDEX "WDIDX_job_work_jw_job_stage_id" ON "job_work" ("jw_job_stage_id"); CREATE INDEX "WDIDX_job_work_jw_dealer_id" ON "job_work" ("jw_dealer_id"); CREATE INDEX "WDIDX_job_work_jw_customer_id" ON "job_work" ("jw_customer_id"); CREATE INDEX "WDIDX_job_work_jw_item_id" ON "job_work" ("jw_item_id"); CREATE INDEX "WDIDX_job_work_jw_lamination_id" ON "job_work" ("jw_lamination_id"); CREATE INDEX "WDIDX_job_work_jw_cover_pad_id" ON "job_work" ("jw_cover_pad_id"); CREATE INDEX "WDIDX_job_work_jw_job_status_id" ON "job_work" ("jw_job_status_id"); CREATE INDEX "WDIDX_job_work_jw_item_type" ON "job_work" ("jw_item_type"); CREATE INDEX "WDIDX_job_work_jw_billed" ON "job_work" ("jw_billed"); -- Creating the job_work_details table CREATE TABLE "job_work_details" ( "jwd_id" INTEGER PRIMARY KEY , "jwd_jw_id" INTEGER , "jwd_bom_id" INTEGER , "jwd_item_id" INTEGER , "jwd_uom_id" INTEGER , "jwd_qty" NUMERIC(24,6) , "jwd_package_id" INTEGER ); CREATE INDEX "WDIDX_job_work_details_jwd_jw_id" ON "job_work_details" ("jwd_jw_id"); -- Creating the job_work_sub_products table CREATE TABLE "job_work_sub_products" ( "jwsp_id" INTEGER PRIMARY KEY , "jwsp_item_id" INTEGER , "jwsp_qty" INTEGER , "jwsp_item_type" INTEGER , "jwsp_jw_id" INTEGER , "jwsp_product_type" INTEGER , "jwsp_size" INTEGER , "jwsp_paper" INTEGER , "jwsp_lamination" INTEGER , "jwsp_package_id" INTEGER , "jwsp_stage_id" INTEGER , "jwsp_delivered" BIT ); CREATE INDEX "WDIDX_job_work_sub_products_jwsp_item_id" ON "job_work_sub_products" ("jwsp_item_id"); CREATE INDEX "WDIDX_job_work_sub_products_jwsp_jw_id" ON "job_work_sub_products" ("jwsp_jw_id"); CREATE INDEX "WDIDX_job_work_sub_products_jwsp_stage_id" ON "job_work_sub_products" ("jwsp_stage_id"); CREATE INDEX "WDIDX_job_work_sub_products_OptimCompKey_jwsp__jwsp_" ON "job_work_sub_products" ("jwsp_stage_id","jwsp_jw_id"); CREATE INDEX "WDIDX_job_work_sub_products_OptimCompKey_jwsp__jwsp__1" ON "job_work_sub_products" ("jwsp_stage_id","jwsp_item_id"); CREATE INDEX "WDIDX_job_work_sub_products_OptimCompKey_jwsp__jwsp__jwsp_" ON "job_work_sub_products" ("jwsp_stage_id","jwsp_jw_id","jwsp_item_id"); TIA
Yogi Yang |
| |
| |
| | | |
|
| | |
| |
| Publicado el 10,septiembre 2016 - 07:31 |
Oh!
BTW my PC is Core i5 with 8 GB RAM and 600 GM HDD 40% of which is empty.
TIA
Yogi Yang |
| |
| |
| | | |
|
| | |
| |
| Publicado el 10,septiembre 2016 - 15:05 |
Hi
If I were you, I'd use
"jw_id" INTEGER NOT NULL PRIMARY KEY AUTO_INCREMENT
instead of
"jw_id" INTEGER PRIMARY KEY
and with your own script to generate unique jw_id.
As I never have such with key AUTO_INCREMENT even a power failure or clock timing issue.
HTH
King |
| |
| |
| | | |
|
| | |
| |
| Publicado el 12,septiembre 2016 - 08:51 |
Hello King,
Thanks for your inputs.
But how do I do that?
Here is the screen shot: [attachment 2146 2016-09-12_122015.jpg]
TIA
Yogi Yang |
| |
| |
| | | |
|
| | |
| |
| Publicado el 12,septiembre 2016 - 08:56 |
| In your screenshot you have selected the wrong item (it is a date field), select the first item and then the options get active. |
| |
| |
| | | |
|
| | |
| |
| Publicado el 12,septiembre 2016 - 09:28 |
To me it looks like your datafile is damaged in some way. Reindex did not help you said. Try deleting the whole file and start with a new fresh one and see what happens. |
| |
| |
| | | |
|
| | |
| |
| Publicado el 13,septiembre 2016 - 12:10 |
Arie,
Thanks for the hint.
I did nto erase the file but I erased all the records from file and now it is working properly.
Regards,
Yogi Yang |
| |
| |
| | | |
|
| | |
| |
Miembro registrado 34 mensajes |
|
| Publicado el 14,septiembre 2016 - 13:18 |
I had something similar. It's caused when something goes wrong with something else outside Windev when it was trying to work with a record.
You have to reindex the file with the mode of hNdxCompact+hNdxDelete+hCheckMemo and it fixes it.
-- Regards,
Norman |
| |
| |
| | | |
|
| | | | |
| | |
|