Click here to Skip to main content
15,559,459 members
Home / Discussions / C#
   

C#

 
GeneralRe: Question about multicast Pin
Heath Stewart15-Jan-04 7:02
protectorHeath Stewart15-Jan-04 7:02 
Generalwinforms: aligning of column headers Pin
troels_sorensen15-Jan-04 2:23
troels_sorensen15-Jan-04 2:23 
GeneralRe: winforms: aligning of column headers Pin
Heath Stewart15-Jan-04 6:53
protectorHeath Stewart15-Jan-04 6:53 
GeneralRe: winforms: aligning of column headers Pin
troels_sorensen15-Jan-04 8:45
troels_sorensen15-Jan-04 8:45 
GeneralRe: winforms: aligning of column headers Pin
Heath Stewart15-Jan-04 10:24
protectorHeath Stewart15-Jan-04 10:24 
GeneralMultiple Datarelations Pin
switchname15-Jan-04 2:04
switchname15-Jan-04 2:04 
GeneralRe: Multiple Datarelations Pin
Mazdak15-Jan-04 3:40
Mazdak15-Jan-04 3:40 
GeneralRe: Multiple Datarelations Pin
switchname15-Jan-04 4:06
switchname15-Jan-04 4:06 
sorry for that. here the problem more detailed:

I have three datatables in one dataset. this construct shall save datastrings for many kinds of databases. i want to connect thee three tables in that way:

Tablenames: Databases, Connectionstrings, Parameter

one database can have several connectionstrings, one connectionstring can have several parameters.

i connected the tables that way:

//CODE:-------------------------------------------------------

System.Data.DataColumn dc2 = ds.Tables["Datenbanken"].Columns["id"];
System.Data.DataColumn dc4 = ds.Tables["ConnectionStrings"].Columns["db"];

DataRelation dbcs = new DataRelation("dbcs", dc2, dc4); //dbcs = Database --> Connectionstring
ds.Relations.Add(dbcs);

System.Data.DataColumn dc3 = ds.Tables["ConnectionStrings"].Columns["id"];
System.Data.DataColumn dc1 = ds.Tables["Parameter"].Columns["cs"];

DataRelation cspm = new DataRelation("cspm", dc3, dc1); //cspm = ConnectionString --> Parameter
ds.Relations.Add(cspm);

dataGrid1.DataSource = ds;
dataGrid1.DataMember = "Datenbanken";
dataGrid2.DataSource = ds;
dataGrid2.DataMember = "Datenbanken.dbcs";
dataGrid3.DataSource = ds;
dataGrid3.DataMember = "ConnectionStrings.cspm";


//END OF CODE----------------------------------------

"id" is always the primary key

the relation "cspm" does not work

better?Big Grin | :-D

mfg
GeneralRe: Multiple Datarelations Pin
Heath Stewart15-Jan-04 6:51
protectorHeath Stewart15-Jan-04 6:51 
GeneralRe: Multiple Datarelations Pin
Anonymous15-Jan-04 7:21
Anonymous15-Jan-04 7:21 
GeneralRe: Multiple Datarelations Pin
Heath Stewart15-Jan-04 10:45
protectorHeath Stewart15-Jan-04 10:45 
GeneralRe: Multiple Datarelations Pin
switchname15-Jan-04 7:24
switchname15-Jan-04 7:24 
QuestionActive application? Pin
phimix15-Jan-04 0:32
phimix15-Jan-04 0:32 
AnswerRe: Active application? Pin
Mazdak15-Jan-04 3:47
Mazdak15-Jan-04 3:47 
GeneralRe: Active application? Pin
phimix16-Jan-04 4:07
phimix16-Jan-04 4:07 
GeneralC#/Java communication Pin
Norman Fung15-Jan-04 0:31
Norman Fung15-Jan-04 0:31 
GeneralRe: C#/Java communication Pin
Jinwah15-Jan-04 0:50
Jinwah15-Jan-04 0:50 
GeneralRe: C#/Java communication Pin
Norman Fung15-Jan-04 4:55
Norman Fung15-Jan-04 4:55 
GeneralRe: C#/Java communication Pin
Heath Stewart15-Jan-04 6:04
protectorHeath Stewart15-Jan-04 6:04 
GeneralRe: C#/Java communication Pin
Norman Fung15-Jan-04 7:24
Norman Fung15-Jan-04 7:24 
GeneralOwner drawn menus Pin
UB15-Jan-04 0:01
UB15-Jan-04 0:01 
GeneralRe: Owner drawn menus Pin
Heath Stewart15-Jan-04 5:48
protectorHeath Stewart15-Jan-04 5:48 
GeneralRe: Owner drawn menus Pin
UB16-Jan-04 6:39
UB16-Jan-04 6:39 
GeneralScrolled object positioning Pin
Jinwah14-Jan-04 23:08
Jinwah14-Jan-04 23:08 
GeneralRe: Scrolled object positioning Pin
Heath Stewart15-Jan-04 5:38
protectorHeath Stewart15-Jan-04 5:38 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.