Take the 2-minute tour ×
Programmers Stack Exchange is a question and answer site for professional programmers interested in conceptual questions about software development. It's 100% free, no registration required.

I'm designing a utility that will load data into a legacy SQL Server Database.

I've been trying to mock up a simple WinForms utility with C# using the DataSource connectors (Tried a straight ORM Entity Framework approach first, but was having problems as the db follows few conventions).

I am having particular difficulty in establishing parent/child relationships and displaying them with data grids (ie, click on this row and the child grid gets filtered).

Some examples of database challenges:

  • No foreign keys with referential constraints. What would normally be a foreign key shows up as part of the Primary composite key in "child" table. Sometimes with different data types (ie, double instead of long)

  • Sometimes a composite key is used on a parent table to define the entity, but only one of those composite fields shows up in a "child" table. {dbo.Parent Key = [ParentID, ParentGroupID, OtherField], dbo.Child Key = [ChildID, ParentID]}

  • Naming conventions are non existent.

Things like this make it difficult to bind data sets to parent/child data grids, and use some of the other out of the box functionality that .NET offers.

How to address above challenges?

I tried looking at some older ADO.Net tutorials but sometimes methods have changed or are no longer available...

share|improve this question
meta.programmers.stackexchange.com/questions/6483/… (it's the same here as at Stack Overflow) –  gnat May 2 at 20:33
I feel like I covered the obligation for this part: Instead, describe the problem and what has been done so far to solve it. Should I rephrase the question to "has anyone here faced this challenge and made it to the other side? If so, how?" Or is there a better forum for general programming advice? –  wesmantooth May 2 at 20:41
A useful tutorial on traditional ADO.Net usage has helped me out quite a bit. codeproject.com/Articles/361579/… –  wesmantooth May 5 at 15:41

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.