Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Coding
Message
From
26/08/2008 08:21:22
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivia
 
 
To
26/08/2008 08:03:36
Muthu Vel
Sty Company
India
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Title:
Re: Coding
Environment versions
Visual FoxPro:
VFP 9
OS:
Windows XP
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01341734
Message ID:
01341740
Views:
19
>I have create Bus Reservation.dbf, its having five fields namely 1.name 2.date of reservation 3.class 4.No of tickets 5. Bus No.
>
>No of tickets for a date for First class = 30
>
>No of tickets for a date for 2nd class = 50
>
>I want to wite a source code for a Bus reservation in such away, everyday the Accomodation opens with a fixed number of tickets
>(above I have mentioned) that has to be repeated every day so that the process will be repeated infinitely. i e on all day.
>
>How to write code?

If I understand correctly, you want to create the 80 records for the reservations.

You can write a loop, and use either INSERT INTO or APPEND BLANK to add the records. For example:
* First class
local i
for i = 1 to 30
  append blank
  replace;
    date with date(),;
    class with 1,;
    ...
next
* Similar for second class
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)
Previous
Reply
Map
View

Click here to load this message in the networking platform