Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How can I check duplicates in TableBuffer View?
Message
 
 
À
30/10/2001 16:15:03
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Divers
Thread ID:
00575321
Message ID:
00575333
Vues:
27
>Hi All,
>
>My view is table buffered. and I have to check duplicates in it. I wana to check duplicates on cCode + dDate. In one of my other form where i am checking duplicate on only one field I was using
>
>Copy all to array for field... and then
>for i = 1 to alen(array)
>scan the array
>endfor
>
>but here i wana to check duplicates on two fields. code + date. can anyone give me idea please?
>
>Thanks in advance
>Mark

If it's buffered and you can not use select SQL, you can do:
go top
lcCombination = code+dtos(date)
lnDupl=0
scan
  if code+dtos(date) = m.lcCombination
     lnDupl = m.lnDupl+1
     if m.lnDupl>1 && Dupl
       && Do what you want to do - insert dupes into another cursor or whatever
     endif
  else
     lcCombination = code+dtos(date)
     lnDupl = 1
  endif
endscan
This code from the top of my head and not tested.
If it's not broken, fix it until it is.


My Blog
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform