Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
2 tables at mygrid
Message
De
23/08/2005 06:36:44
 
 
À
23/08/2005 06:06:07
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Versions des environnements
Visual FoxPro:
VFP 8
Database:
Visual FoxPro
Divers
Thread ID:
01042845
Message ID:
01042848
Vues:
20
Hi M

I'm presuming the second table contains some statistics about the courses and is therefore linked to it by some key, which you haven't detailed. If this is the case then you want a query/view that brings the two together in a cursor, then programmatically set the cursor to be the recordSource of your grid. e.g. something like:
Select course.coursenumber, course.coursename, ;
       table2.g1, table2.g2, table2.wm1, table2.g3, table2.tot1, ;
       table2.chr1, table2.g4, table2.g5, table2.wm1, table2.g6, table2.tot2, table2.ltot, table2.chr2 ;
  from Course ;
  inner join on table2.courseFK = course.coursePK ;
  into cursor csrCourseStats

Thisform.myGrid1.RecordSource = "csrCourseStats"
HTH

Terry

>hi all,
>would you help me,
>
>i want to get fields form 2 tables to mygrid as under
>table1 have course number,course name
>table 2 have g1,g2,wm1,g3,tot1,chr1,g4,g5,wm1,g6,tot2,ltot,chr2
>
>i need to see at mygrid1 course name from table1
>and g1,g2,wm1,g3,tot1,chr1,g4,g5,wm1,g6,tot2,ltot,chr2
>from table2
>
>and i need to save(append) at table2 COURSE NUMBER from table1
>and all records have g1,g2,wm1,g3,tot1,chr1,g4,g5,wm1,g6,tot2,ltot,chr2
>
>course name  g1   g2  wm1  g3  tot1  chr1 g4 g5 wm1 g6 tot2 ltot chr2
>  math       14.5 12  7    40   73.5  ..............................
>  since .............................................................
>   .
>   .
>   .
>   .
>   .
>
>
>thanks.
>m.qasem
- Whoever said that women are the weaker sex never tried to wrest the bedclothes off one in the middle of the night
- Worry is the interest you pay, in advance, for a loan that you may never need to take out.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform