If you are running x64 then you'll need to install the following:
Microsoft SQL Server Compact 3.5 Service Pack 1 and Synchronization Services for ADO.NET version 1.0 Service Pack 1 for Windows Desktop
This threw me for a loop because my form would simply load without any data. As a result I would be stepping through code (stepping over my data layer) and my form would activate with nothing in it. Drilling down deeper I discovered the view would activate on line 228 below:
222 public DataBindingList<T> ExecuteList<T>(string sqlCommand, ListDelegate<T> listDelegate)
223 {
224 try
225 {
226 DataBindingList<T> dataList = new DataBindingList<T>();
227
228 using (SqlCeConnection conn = new SqlCeConnection(ConnString))
229 {
This had me scratching my head wondering if some of the Async processes were messing with my debugger. Since it worked on the 32-bit development box (which I don't currently have with me) I had no reason to suspect foul play on my x64 development box - this misconception resullted in much head-banging time.
I should have payed attention to this error earlier, as it would reveal itself, but more towards the end of the debugging session and not on line 228 above; it would reveal itself as a messagebox not attached to any particular line of code. I wrongly had suspected corrupt dlls as I am dabbling in a multi-targeting application (code shared between mobile and winforms). It wasn't until I placed the try/catch (shown above) that the error revealed itself within the scope of the process.
Hopefully you'll hit this blog before the others because Head-banging occurred longer than it needed as I ended up chasing rouge blogs on this topic that had me going in circles until I figured out they were dead-ends. In the end the fix was quite simple - simply install SP1 and everything started working.
Tags:
sp1,
headbanger,
compact framework,
sqlce
Categories: