Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Coding
Message
De
17/02/2009 04:14:40
 
 
À
17/02/2009 00:16:53
Muthu Vel
Sty Company
Inde
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Titre:
Re: Coding
Versions des environnements
Visual FoxPro:
VFP 9
OS:
Windows XP
Database:
Visual FoxPro
Divers
Thread ID:
01382279
Message ID:
01382292
Vues:
46
I don't see anything wrong with your code. Since you don't get an error message, merely no data, My guess is that it is a data or data entry issue. What happens if you leave the same dates in your textboxes and click on the command button a second time?

Try stepping through the code and verifying that you have valid data in your Temp cursor
For debugging purposes modify the code to be
SET STEP ON

local lcFrom, lcTo
lcFrom = CTOD(ThisForm.TxtFromdate.Value)
lcTo = CTOD(ThisForm.TxtTdateto.Value)

select * from student;
  where date between lcFrom and lcTo;
  order by date;
  into cursor Temp

Report form "D:\List.frx" preview
You can now easily check the values of lcFrom and lcTo as well as seeing how many records are in the Temp cursor when you run your query.

>I have designed "Report preview.scx" in that i have placed two text boxes namely 1.txtfromdate 2.txtdateto and one command button namely
>"cmdpreviw". I want to preview data between two dates and I have written code below
>
>local lcFrom, lcTo
>lcFrom = ThisForm.TxtFromdate.Value
>lcTo = ThisForm.TxtTdateto.Value
>select * from student;
> where date between CTOD(lcFrom )and CTOD(lcTo);
> order by date;
> into cursor Temp
>Report form "D:\List.frx" preview
>
>For first time I have entered dates in corresponding text boxes and click command button the preview will display, and i have clear the dates in two text boxes again I have entered different dates and click command button the preview will not display.
>
>how to correct my code? or
>Kindly advise me how to write code?
>
>thanking you
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform