Hey guys,

I've got 2 tables...



now computer has a FK constraint from Motherboards PK so I can no longer do a simple insert without having the motherboard present. That all works correctly.

Now in my ADO I've got an insert statement on Computer which calls a stored proc. Should I pass all my variables to the Stored proc? and call internally other Storede procs from the main one?

Or should ADO be able to handle mapping? I'm confused how I can tell my ADO to insert into Motherboard first and then insert into Computer.

A stored procedure handling all necessary variables is a god solution to isolate he problem of inserting from your application.

Hope this helps