Linq : Insert doesn't work
-
I use the following code in this function : public void VoegNieuwDossierToe(string pDossierNr, int pSectId) { Invordering invordering = new Invordering(); invordering.INVO_DOS_NR = pDossierNr; invordering.INVO_SECT_ID = pSectId; dc.Invorderings.InsertOnSubmit(invordering); dc.SubmitChanges(); } I don't get any error messages but the record isn't inserted in the database !! Someone who can help me ?
-
I use the following code in this function : public void VoegNieuwDossierToe(string pDossierNr, int pSectId) { Invordering invordering = new Invordering(); invordering.INVO_DOS_NR = pDossierNr; invordering.INVO_SECT_ID = pSectId; dc.Invorderings.InsertOnSubmit(invordering); dc.SubmitChanges(); } I don't get any error messages but the record isn't inserted in the database !! Someone who can help me ?
Where's your database? Is it included as a local resource in your project? If so, check in the bin directory when the program is running because it will copy over the database into the bin directory at runtime (so any changes won't be made to the one you are running in the solution explorer).
"WPF has many lovers. It's a veritable porn star!" - Josh Smith
-
Where's your database? Is it included as a local resource in your project? If so, check in the bin directory when the program is running because it will copy over the database into the bin directory at runtime (so any changes won't be made to the one you are running in the solution explorer).
"WPF has many lovers. It's a veritable porn star!" - Josh Smith
My database isn't included as a local resource. I made my database in SQL Server 2005 and then made a dataclass model to work with LINQ. Any idea what the problem can be ?