I think I found the problem.
Followed following thread at
http://social.msdn.microsoft.com/Forums/en-US/adodotnetdataproviders/thread/565f\
3649-48fd-4b7f-b062-df8aee57bcfa
Apparently, I had to set my DataDirectory value in the connection string
explicitly using AppDomain.SetData() method.
My guess is that, otherwise, database was not found, and that's why records were
not updated. However, application didn't throw any errors.
If anyone interested also interesting post:
http://waxtadpole.wordpress.com/2008/05/08/linq-contextsubmitchanges-does-not-ad\
d-record-to-database/
And the link from it:
http://www.codinghorror.com/blog/archives/001079.html
Main idea - 'always assume the problem is in your code' :)))
I found that article pretty interesting and somewhat funny.
Thanks for the help
--- In CSCI-E237-Fall2009@yahoogroups.com, Ayman Ali <alialiayman@...> wrote:
>
> you can set a trace in SQL server to see if your SQL arrived to the SQL
> server at all.
> Usually this happens if the table does not have a primary key, submit
> changes does not submit and also does not throw an error.
>
> if the problem is something else, you can findout about it by getting the
> SQL received by SQL server (by setting a trace), run it yourself in
> management studio, when you do that you will see the error right there in
> management studio.
>
> you may also find that there is some conflict between the object model and
> database.
>
> here is some more info about how submit changes work
> http://msdn.microsoft.com/en-us/library/bb399378.aspx
>
> <http://msdn.microsoft.com/en-us/library/bb399378.aspx>here is some article
> about missing primary key problem
> http://forums.asp.net/t/1241069.aspx
>
> <http://forums.asp.net/t/1241069.aspx>
>
> On Fri, Oct 2, 2009 at 1:50 AM, rumbergd <rumbergd@...> wrote:
>
> >
> >
> > Lots of fun with SubmitChanges function on inserting a row:
> >
> > 1) outside the visual studio everything works fine
> >
> > 2) inside visual studio when i run program, and insert a row for example it
> > adds a row. But when I exit and check the table in Server Explorer, and do
> > 'show table data' nothing is changed... Even if refresh data nothing
> > happens.
> > I checked all connection strings are ok.
> >
> > Does anyone know what's going on here?
> >
> >
> >
>