Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Select records
Message
De
10/09/2004 17:36:29
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivie
 
 
À
10/09/2004 17:03:00
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Titre:
Divers
Thread ID:
00940543
Message ID:
00941239
Vues:
8
>hi,
>
>i'll try to change the code ,to do what i want , iget mwny errors messages.

To correct errors, do the following.

First, the code you present should not even compile correctly - there is an error that seems quite obvious to me. I could show it to you, but it will be much more fun for you - and more useful in the long run - if you learn how to solve problems in general. If you don't know why there is an error, you should at least know in which command the error appears, and of course, write down the error message, before asking for help.

To find the error, if it is in a PRG, select "Program | Compile". Visual FoxPro will select the line that has an error. After correcting the error, compile again, and repeat, until you have no compilation errors.

If your program does compile correctly, you may still have errors at runtime (that is, when you run the program). When this happens, you will usually get a window with several options. Select "Suspend", and open the debugger (type DEBUG at the Command Window). The line where the error appeared should be selected.

Once you are in the debugger, you can, for example, check if your variables really have the values which you expect them to have, and then continue investigating.

You can also invoke the debugger before an error occurs. Just include the command SET STEP ON in a strategic place in your program. The debugger will immediately appear. After that command, you can continue running your program, one line at a time.

HTH,

Hilmar.

>
>i want to get dat as
>
>area 1     day 1   day2   day 3
>           800  +  800 +  800  ---->2400   records randomly
>
>area 2     day 1   day2   day 3
>           800  +  800 +  800  ---->2400   records randomly
>
>area 3     day 1   day2   day 3
>           800  +  800 +  800  ---->2400   records randomly
>
>                         total is  7200 records
>
>
>this the code i'll try to do above
>
>
>CLOSE ALL
>use one
>copy structure to TempResult
>use TempResult in 0
>select *, rand() * 0.000000 as random;
>  from MyTable;
>  into cursor Temp;
>  order by date_code AND area
>  brow
>
>go top
>for i = 1 to 3
>  select Temp
>  locate rest for area = i AND date_code=i
>  copy next 800 to temp2 while area = i and date_code = i
>  select TempResult
>  append from temp2
>next
>
>
>
>thanks
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