Versions des environnements
Network:
Windows 2003 Server
Bonnie,
I have code like this:
SqlCommand cmd;
cmd=new SqlCommand("select PK_ADR, navn, fk_postnr from m0_Adressat WHERE (pk_ADR =109271 )");
cmd.Connection=this.sqlConnection1;
// cmd.ExecuteReader();
this.sqlDataAdapter1.SelectCommand=cmd;
this.dsAdrData=new DataSet("dsAdr");
this.sqlDataAdapter1.Fill(this.dsAdrData,"M0_Adressat");
cmd=new SqlCommand("Select PK_JOURNALID, aar, jrnlnr, fk_adr, regdato from m1_Journal where (fk_adr=109271)");
cmd.Connection=this.sqlConnection1;
this.sqlDataAdapter1.SelectCommand=cmd;
this.sqlDataAdapter1.Fill(this.dsAdrData,"M1_Journal");
return this.dsAdrData.GetXml()
but this is not using the schema description I have in a xsd-file. How do I connect data with the schema? (I thought I should end up with a nested dataset)
>Einar,
>
>First off, so nobody tries to re-invent the wheel ... what have you got done so far? It sounds like you've accomplished your task when your DataSet has just one table. Could you please post some code and then maybe we can point you in the right direction ....
>
>~~Bonnie
>
>
>>Can you help me with a sample for the following?:
>>
>>I have created a dataset in a xsd-file as a customer table with several related tables (Like master-detail-detail). I want to select a single customer with related data using sqlAdapter and fill the dataset which then is to be stored as xml in a memo-field on another server. I have not figured out how to do this when there are more than one table involved.
Précédent
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement