hiya,
Thanks for the replies.
ok, I've made a bit of progress.
this is the relationship
job
jobId GUID (PK)
jobDescription
jobItem
jobItemId GUID (PK)
jobId GUID (FK)
In other words, there are many jobItems to a single job.
I hope that makes sense?
I'd like to post the new code so that it's clear what I should do.
JobEntity job = JobFactory();
job.Description = TextBox2.Text;
etc
DataAccessAdapter adp = new DataAccessAdapter(true);
adp.SaveEntity(job, true);
//Now, I create a new jobItem
JobItemEntity jobItem = new JobItemEntity();
jobItem.JobId = job.JobId;
adp.SaveEntity(jobItem); // Error:
The INSERT statement conflicted with the FOREIGN KEY constraint "FK_JobItem_Job". The conflict occurred in database "dbDev", table "dbo.Job", column 'JobId'.
Does this make it any clearer?
I wanted to post the new stuff, just to make sure.
many thanks,
yogi