'Hanging' on SubmitChanges() ...
-
Hi All, I've just been playing with LINQ for the first time. I have an SQLCE database that I've mapped using SQLMetal.exe to generate the dbml / cs / xml mapping files. I've loaded them into my solution and started coding against it just to check out how its all working. I'm just testing things from the immediate window and having a play. The whole thing seems to come to a grinding halt on the DataContext.SubmitChanges(); line. I have a few lines adding values to an object that represents a new record, the record even gets entered into the database correctly but my program then just sits there not doing anything, it never hits the breakpoint on the following line. Has anyone else seen this happen? my code looks like:
SSdb database = new SSdb(Properties.Settings.Default.SSDatabaseDev); LocalSample sample = new LocalSample(); sample.SubCategory = "String"; sample.TrackNo = 1; database.LocalSamples.InsertOnSubmit(sample); database.SubmitChanges();
then I have a line with a breakpoint on it which never gets hit, the entire thing just sits there not doing anything at all. Any pointers would be great.
Jammer Going where everyone here has gone before! :) My Blog
-
Hi All, I've just been playing with LINQ for the first time. I have an SQLCE database that I've mapped using SQLMetal.exe to generate the dbml / cs / xml mapping files. I've loaded them into my solution and started coding against it just to check out how its all working. I'm just testing things from the immediate window and having a play. The whole thing seems to come to a grinding halt on the DataContext.SubmitChanges(); line. I have a few lines adding values to an object that represents a new record, the record even gets entered into the database correctly but my program then just sits there not doing anything, it never hits the breakpoint on the following line. Has anyone else seen this happen? my code looks like:
SSdb database = new SSdb(Properties.Settings.Default.SSDatabaseDev); LocalSample sample = new LocalSample(); sample.SubCategory = "String"; sample.TrackNo = 1; database.LocalSamples.InsertOnSubmit(sample); database.SubmitChanges();
then I have a line with a breakpoint on it which never gets hit, the entire thing just sits there not doing anything at all. Any pointers would be great.
Jammer Going where everyone here has gone before! :) My Blog
-
Hi All, I've just been playing with LINQ for the first time. I have an SQLCE database that I've mapped using SQLMetal.exe to generate the dbml / cs / xml mapping files. I've loaded them into my solution and started coding against it just to check out how its all working. I'm just testing things from the immediate window and having a play. The whole thing seems to come to a grinding halt on the DataContext.SubmitChanges(); line. I have a few lines adding values to an object that represents a new record, the record even gets entered into the database correctly but my program then just sits there not doing anything, it never hits the breakpoint on the following line. Has anyone else seen this happen? my code looks like:
SSdb database = new SSdb(Properties.Settings.Default.SSDatabaseDev); LocalSample sample = new LocalSample(); sample.SubCategory = "String"; sample.TrackNo = 1; database.LocalSamples.InsertOnSubmit(sample); database.SubmitChanges();
then I have a line with a breakpoint on it which never gets hit, the entire thing just sits there not doing anything at all. Any pointers would be great.
Jammer Going where everyone here has gone before! :) My Blog
Jammer - put this in a try/catch block and see if an exception is being thrown. Normally you wouldn't see it hit the breakpoint if it's bypassing it because an unhandled exception is being raised, e.g. you are hitting a DataContext issue.
Deja View - the feeling that you've seen this post before.
-
Jammer - put this in a try/catch block and see if an exception is being thrown. Normally you wouldn't see it hit the breakpoint if it's bypassing it because an unhandled exception is being raised, e.g. you are hitting a DataContext issue.
Deja View - the feeling that you've seen this post before.
I'll try that ... Strange this is the data is hitting the database as expected and the program is running through fine. I am using C# Express 2008 at the moment and I'm wondering if that might be something to do with the odd behaviour of the immediate window in this case? I only have a few days left on my VS2008 trial so I can still test this same code in there later as well. I'll just finish the changes I'm making to my code and wrap this all up in a try{}catch{}. Hope your well.
Jammer Going where everyone here has gone before! :) My Blog
-
I'll try that ... Strange this is the data is hitting the database as expected and the program is running through fine. I am using C# Express 2008 at the moment and I'm wondering if that might be something to do with the odd behaviour of the immediate window in this case? I only have a few days left on my VS2008 trial so I can still test this same code in there later as well. I'll just finish the changes I'm making to my code and wrap this all up in a try{}catch{}. Hope your well.
Jammer Going where everyone here has gone before! :) My Blog
Jammer wrote:
Hope your well.
I'm fine thanks. Sweet tip on the Zam3D by the way. I don't know if it'll replace my affection for C4D, but it's a real easy way to develop models for WPF. How are you doing BTW?
Deja View - the feeling that you've seen this post before.
-
Jammer wrote:
Hope your well.
I'm fine thanks. Sweet tip on the Zam3D by the way. I don't know if it'll replace my affection for C4D, but it's a real easy way to develop models for WPF. How are you doing BTW?
Deja View - the feeling that you've seen this post before.
Yeah really good thanks! Busy with my app! Am just exploring wave file header reading at the moment to get some info for it. All working sweet! Zam3D is great, feature wise its not a pimple on C4D rear end but talk about productivity!! The extrude and lathe editors are just plain fun to use. I like the materials and animations defining too, never need to do things twice. Really looking forward to seeing how it grows as well. Just out of interest have you had any crashes?
Jammer Going where everyone here has gone before! :) My Blog
-
Yeah really good thanks! Busy with my app! Am just exploring wave file header reading at the moment to get some info for it. All working sweet! Zam3D is great, feature wise its not a pimple on C4D rear end but talk about productivity!! The extrude and lathe editors are just plain fun to use. I like the materials and animations defining too, never need to do things twice. Really looking forward to seeing how it grows as well. Just out of interest have you had any crashes?
Jammer Going where everyone here has gone before! :) My Blog
Jammer wrote:
Just out of interest have you had any crashes?
Yup - as well as a couple of hangups and corrupt models (and how I wish that was Cindy Crawford trying her feminine wiles out on me). How about yourself?
Deja View - the feeling that you've seen this post before.
-
Jammer wrote:
Just out of interest have you had any crashes?
Yup - as well as a couple of hangups and corrupt models (and how I wish that was Cindy Crawford trying her feminine wiles out on me). How about yourself?
Deja View - the feeling that you've seen this post before.