Click here to Skip to main content
15,867,453 members
Home / Discussions / C#
   

C#

 
GeneralRe: Question about multicast Pin
Heath Stewart15-Jan-04 6:02
protectorHeath Stewart15-Jan-04 6:02 
Generalwinforms: aligning of column headers Pin
troels_sorensen15-Jan-04 1:23
troels_sorensen15-Jan-04 1:23 
GeneralRe: winforms: aligning of column headers Pin
Heath Stewart15-Jan-04 5:53
protectorHeath Stewart15-Jan-04 5:53 
GeneralRe: winforms: aligning of column headers Pin
troels_sorensen15-Jan-04 7:45
troels_sorensen15-Jan-04 7:45 
GeneralRe: winforms: aligning of column headers Pin
Heath Stewart15-Jan-04 9:24
protectorHeath Stewart15-Jan-04 9:24 
GeneralMultiple Datarelations Pin
switchname15-Jan-04 1:04
switchname15-Jan-04 1:04 
GeneralRe: Multiple Datarelations Pin
Mazdak15-Jan-04 2:40
Mazdak15-Jan-04 2:40 
GeneralRe: Multiple Datarelations Pin
switchname15-Jan-04 3:06
switchname15-Jan-04 3: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 5:51
protectorHeath Stewart15-Jan-04 5:51 
GeneralRe: Multiple Datarelations Pin
Anonymous15-Jan-04 6:21
Anonymous15-Jan-04 6:21 
GeneralRe: Multiple Datarelations Pin
Heath Stewart15-Jan-04 9:45
protectorHeath Stewart15-Jan-04 9:45 
GeneralRe: Multiple Datarelations Pin
switchname15-Jan-04 6:24
switchname15-Jan-04 6:24 
QuestionActive application? Pin
phimix14-Jan-04 23:32
phimix14-Jan-04 23:32 
AnswerRe: Active application? Pin
Mazdak15-Jan-04 2:47
Mazdak15-Jan-04 2:47 
GeneralRe: Active application? Pin
phimix16-Jan-04 3:07
phimix16-Jan-04 3:07 
GeneralC#/Java communication Pin
Norman Fung14-Jan-04 23:31
Norman Fung14-Jan-04 23:31 
GeneralRe: C#/Java communication Pin
Jinwah14-Jan-04 23:50
Jinwah14-Jan-04 23:50 
GeneralRe: C#/Java communication Pin
Norman Fung15-Jan-04 3:55
Norman Fung15-Jan-04 3:55 
GeneralRe: C#/Java communication Pin
Heath Stewart15-Jan-04 5:04
protectorHeath Stewart15-Jan-04 5:04 
GeneralRe: C#/Java communication Pin
Norman Fung15-Jan-04 6:24
Norman Fung15-Jan-04 6:24 
GeneralOwner drawn menus Pin
UB14-Jan-04 23:01
UB14-Jan-04 23:01 
GeneralRe: Owner drawn menus Pin
Heath Stewart15-Jan-04 4:48
protectorHeath Stewart15-Jan-04 4:48 
GeneralRe: Owner drawn menus Pin
UB16-Jan-04 5:39
UB16-Jan-04 5:39 
GeneralScrolled object positioning Pin
Jinwah14-Jan-04 22:08
Jinwah14-Jan-04 22:08 
GeneralRe: Scrolled object positioning Pin
Heath Stewart15-Jan-04 4:38
protectorHeath Stewart15-Jan-04 4: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.