Click here to Skip to main content
15,900,108 members
Home / Discussions / C#
   

C#

 
AnswerRe: Advice or Assistance with remote performance monitoring Pin
PIEBALDconsult20-Sep-11 5:21
mvePIEBALDconsult20-Sep-11 5:21 
GeneralRe: Advice or Assistance with remote performance monitoring Pin
CCodeNewbie20-Sep-11 5:47
CCodeNewbie20-Sep-11 5:47 
GeneralRe: Advice or Assistance with remote performance monitoring Pin
PIEBALDconsult20-Sep-11 14:39
mvePIEBALDconsult20-Sep-11 14:39 
QuestionRetreiving Exe Version information from Program Files Pin
get120620-Sep-11 3:47
get120620-Sep-11 3:47 
AnswerRe: Retreiving Exe Version information from Program Files Pin
Luc Pattyn20-Sep-11 4:10
sitebuilderLuc Pattyn20-Sep-11 4:10 
AnswerRe: Retreiving Exe Version information from Program Files Pin
Pete O'Hanlon20-Sep-11 4:38
mvePete O'Hanlon20-Sep-11 4:38 
AnswerRe: Retreiving Exe Version information from Program Files Pin
Bernhard Hiller21-Sep-11 3:58
Bernhard Hiller21-Sep-11 3:58 
QuestionDataSet & WinForms: Inserting data into a many-to-many table. Pin
cjb11020-Sep-11 2:52
cjb11020-Sep-11 2:52 
I've got 2 tables (Components, Servers) with a many-to-many relationship and hence a 3rd table (ComponentServers) connecting the two main tables.

I've created a DataSet and bound WinForm to show and edit this data, but I can't get it to work if there's no data already there. i.e. UPDATE works but INSERT doesn't. I've checked the SQL and that *looks* ok.

The insert is:
SQL
INSERT INTO ComponentsServers (ComponentID, ServerID, Environment) 
VALUES (@ComponentID,@ServerID,@Environment)

The update is:
SQL
UPDATE ComponentsServers
SET ComponentID = @ComponentID, ServerID = @ServerID, Environment = @Environment
WHERE(ComponentID = @Original_ComponentID) AND (ServerID = @Original_ServerID) AND (Environment = @Original_Environment)


On the form I've done the binding via controls not code, and the ComponentServers BindingSource does reference the related ComponentServers table in the DataSet and not the standalone one.

In the save button I've got:
C#
this.Validate();
this.componentsServersBindingSource.EndEdit();
this.componentsBindingSource.EndEdit();
this.tableAdapterManager.UpdateAll(this.eSSDBDataSet);


The form works from a presentation point a few, and as I said, if I update a exisiting entry. But if there's no row in ComponentServers I can't get it to work.

Any clues as to where I've got it wrong? I *think* its the DataSet, but not sure why!
QuestionDb connection Exception Pin
anishkannan20-Sep-11 0:52
anishkannan20-Sep-11 0:52 
AnswerRe: Db connection Exception Pin
Ravi Sant20-Sep-11 4:52
Ravi Sant20-Sep-11 4:52 
QuestionInstalling additional classes [solved] Pin
DanielCrk19-Sep-11 7:12
DanielCrk19-Sep-11 7:12 
AnswerRe: Installing additional classes Pin
DanielCrk19-Sep-11 7:18
DanielCrk19-Sep-11 7:18 
AnswerRe: Installing additional classes Pin
Eddy Vluggen19-Sep-11 8:50
professionalEddy Vluggen19-Sep-11 8:50 
GeneralRe: Installing additional classes Pin
DanielCrk19-Sep-11 9:07
DanielCrk19-Sep-11 9:07 
GeneralRe: Installing additional classes Pin
Eddy Vluggen19-Sep-11 10:23
professionalEddy Vluggen19-Sep-11 10:23 
AnswerRe: Installing additional classes Pin
jschell19-Sep-11 8:10
jschell19-Sep-11 8:10 
GeneralRe: Installing additional classes Pin
DanielCrk19-Sep-11 9:08
DanielCrk19-Sep-11 9:08 
QuestionC# references Pin
classy_dog19-Sep-11 5:08
classy_dog19-Sep-11 5:08 
AnswerRe: C# references Pin
Richard MacCutchan19-Sep-11 5:54
mveRichard MacCutchan19-Sep-11 5:54 
GeneralRe: C# references Pin
classy_dog19-Sep-11 6:17
classy_dog19-Sep-11 6:17 
GeneralRe: C# references Pin
Rob Philpott19-Sep-11 6:28
Rob Philpott19-Sep-11 6:28 
GeneralRe: C# references Pin
classy_dog19-Sep-11 9:21
classy_dog19-Sep-11 9:21 
GeneralRe: C# references Pin
Richard MacCutchan19-Sep-11 7:36
mveRichard MacCutchan19-Sep-11 7:36 
GeneralRe: C# references Pin
classy_dog19-Sep-11 9:20
classy_dog19-Sep-11 9:20 
GeneralRe: C# references Pin
Richard MacCutchan19-Sep-11 9:28
mveRichard MacCutchan19-Sep-11 9:28 

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.