Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Index does not work (always)
Message
 
 
To
04/02/2003 18:02:40
Michael Ouellette
Australian Technical Services (VIC) Pty
Australia
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00749122
Message ID:
00749129
Views:
24
Hi Michel,

It's realy bad idea to use DTOC(somedate) in the index key. First, result returned by that function depends on date setting, including SET DATE, SET CENTURY and other. Second it doesn't order records properly. You should seriously consider changing it to DTOC(somedate,1).

>I just convert an application from FPW2.6 to VFP6
>Now my mergeing program does not work
>
>I have 3 PC's all with the same data
>When one person updates their files they then export these records so as to keep one PC uptodate with all changes
>PC1, the master then imports these records.
>The process is this
>compare Company_id C(7), Employee_id C(7) and testdate D from PC2 to the same record in PC1
>
>The index is Company_id+Employee_id+dtoc(testdate) on both PC's (length =24)
>
>I first find the record from PC2 on PC1
>Then I compare a timestamp (another field) to see who changed it last
>If PC2 is newer I update PC1
>IF PC1 does not have that record I add it
>
>The problem is that all records are now duplicating!
>If I compare the two records with ?(Company_id+Employee_id+dtoc(testdate) )
>they are identical
>
>I've tried reindexing
>I've tried deleting all tags then recreating the index, still no go
>I tried changing dtoc(testdate) to dtos(testdate) and now I get no duplicates but new records are not added.
>
>Now the best part! The process works on a 3rd PC! I'm pulling my hair out
>
>Environment
>Win 98 SE
>VFP6 SP5
>Century is on
>Date=British
>
>Config.fpw is the same
>
>TIA
--sb--
Previous
Reply
Map
View

Click here to load this message in the networking platform