locked
.NET Application with SQL Server CE Database RRS feed

  • Question

  • I just started using SQL Server CE 3.5 in my WinForms Application (C# in VS 2008 SP1).

    I've noticed a couple of interesting things I'd like some input on:

    1. Copying of sdf file to bin

    My sdf file is located inside of an Infrastructure project that houses my repository implementations. When the application is first debugged the sdf was copied to debug\bin. This is where all future reads/writes operate.

    At some point when this is deployed the file will go into a data folder using Click Once, but during development where should I be putting this sdf? Is having it in the bin typical, or are there any other recommendations?

    2. Updating sdf

    It appears that writing to the sdf file does not immediately update the database. I am using Linq-to-SQL and am calling SubmitChanges, but on read the values are not returned.

    However if I close the application and re-open it the added value is there. Is there an additional flush step I need to take? What is causing this, file locking, buffering, something else?

    I appreciate any guidance on these two questions, thanks.

    Friday, March 26, 2010 10:57 PM

Answers

All replies