Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Grid from multiple tables
Message
 
À
18/08/2005 10:29:32
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivie
Information générale
Forum:
ASP.NET
Catégorie:
Bases de données
Versions des environnements
Environment:
C# 1.1
Database:
Jet/Access Engine
Divers
Thread ID:
01041958
Message ID:
01041960
Vues:
27
This message has been marked as a message which has helped to the initial question of the thread.
Hilmar,

I'm not 100% sure about this, but I don't think you have to change that at all. All you have to do is change the query. The literal Student in line 4 is telling the data adapter what to call the data table created by the query and line 6 is telling the grid which data table to use from the data set. Line 4 would be comparable to this in VFP with SPT:
SQLEXEC(handle, query, 'Student')
So, it doesn't really matter what you call as long as you use the same thing in both places.

HTH,
Chad


>I have loaded a grid with data from a single table, and would like to know what adaptations are required to use a multi-table join.
>
>What I have is something like this:
>
>
>String query = "select * from Student order by LastName";
>da = new OleDbDataAdapter(query, Cn);
>ds = new DataSet();
>da.Fill(ds, "Student");
>this.dataGrid.DataSource = ds;
>this.dataGrid.DataMember = "Student";
>
>
>Data is stored in Access. I don't think I would have trouble with the JOIN (unless Access syntax is significantly different from Visual FoxPro), but:
>
>What should I replace for "Student" in lines 4 and 6, if the query spans 2 or more tables?
>
>TIA,
>
>Hilmar.
_________________________________
There are 2 types of people in the world:
    Those who need closure
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform