Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Replace TXT
Message
From
04/07/2003 04:59:41
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
 
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Title:
Miscellaneous
Thread ID:
00806664
Message ID:
00806892
Views:
10
This message has been marked as a message which has helped to the initial question of the thread.
>The parent table is client (fields id and name)
>
> The child table is products (fields product and id)
>
> I've created a relation and a form with 2 pages
> The first page has the client data and the second page has a grid
> with the products of the client
>
>
> The job I need is
>
>
> Select client
> go top
> frec = recno ()
>
> Get all the records in table product which is related to the
>the record in the parent table
> store to a txt file ( the txt file name will be named &frec)
>
> select client
> store skip + 1
> Get all the records in table product which is related to the
>the record in the parent table
>
> ... until the end of the table clientes

Moises,
As already there is a relation :
select client
scan
 If !Eof('products')
   lcFileName = ltrim(str(recno()))+'.txt'
   select products
   copy to (lcFileName) type delimited while id = client.id
 endif
 select client
endscan
Cetin
Çetin Basöz

The way to Go
Flutter - For mobile, web and desktop.
World's most advanced open source relational database.
.Net for foxheads - Blog (main)
FoxSharp - Blog (mirror)
Welcome to FoxyClasses

LinqPad - C#,VB,F#,SQL,eSQL ... scratchpad
Previous
Reply
Map
View

Click here to load this message in the networking platform