linq to sql , insert into db using store procedure
-
hello every body I am unable to insert data into a db using a store procedure in the LINQ to SQL .The code is: LinqToSQLDataContext dc = new LinqToSQLDataContext(); info inf = new info { Id = 1, name = "Ali" ,infoD="he is agood boy"}; dc.UserDetails.InsertOnSubmit(inf); dc.SubmitChanges(); but the error is system.data.table.InsertOnSubmit has some invalid arguments
-
hello every body I am unable to insert data into a db using a store procedure in the LINQ to SQL .The code is: LinqToSQLDataContext dc = new LinqToSQLDataContext(); info inf = new info { Id = 1, name = "Ali" ,infoD="he is agood boy"}; dc.UserDetails.InsertOnSubmit(inf); dc.SubmitChanges(); but the error is system.data.table.InsertOnSubmit has some invalid arguments
tanweer akhtar wrote:
dc.UserDetails.InsertOnSubmit(inf);
I guess
inf
is not the same type of data object in the table UserDetails.Arun Jacob http://codepronet.blogspot.com/