Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Randomly records
Message
De
20/07/2004 09:07:12
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivie
 
 
À
20/07/2004 03:46:25
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00926023
Message ID:
00926062
Vues:
28
>hi all,
>
>i want to creat new table via this code,
>
>to insert any numbers of record randomly,the number insert from (thisform.text1.value)
>
>ex.. thisform.text1.value=4500
>my newtable have 4500 randomly records.
>
>this is the code.
>use ac exclusive
>index on arow_clien tag arow_clien
>select sys(2015) as SortOrder,* from ac ;
> order by 1 descending ;
> into cursor crsTemp nofilter
>select ac
>zap
>select crsTemp
>scan
> if !seek(arow_clien ,'ac','arow_clien')
> *if !seek(arow_clien ,'amman','arow_clien ')
> scatter memvar memo
> insert into ac from memvar
> endif
>endscan

To insert 4500 records, you can use a FOR loop:
...
for i = 1 to 4500
* or: for i = 1 to ThisForm.Text1.Value
  insert into ac...
next
Difference in opinions hath cost many millions of lives: for instance, whether flesh be bread, or bread be flesh; whether whistling be a vice or a virtue; whether it be better to kiss a post, or throw it into the fire... (from Gulliver's Travels)
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform