im about to pull my hair out. No matter what, the child rows just never get inserted in the database. I changed my code even to test. I removed the code that adds rows programmatically to the child table and added them directly into the datagridview. The resultid gets generated in the datatable but doesn't insert in the db. JM i beg you please help.