It does not make much difference--BUT, when the connection is closed for the
last time, the engine compacts the database. This means that no matter what
strategy you choose, you need to make sure to leave at least one connection
open until the application is ready to end.

Signature
____________________________________
William (Bill) Vaughn
Author, Mentor, Consultant, Dad, Grandpa
Microsoft MVP
INETA Speaker
www.betav.com
www.betav.com/blog/billva
Please reply only to the newsgroup so that others can benefit.
This posting is provided "AS IS" with no warranties, and confers no rights.
__________________________________
Visit www.hitchhikerguides.net to get more information on my latest book:
Hitchhiker's Guide to Visual Studio and SQL Server (7th Edition)
and Hitchhiker's Guide to SQL Server 2005 Compact Edition (EBook)
-----------------------------------------------------------------------------------------------------------------------
> hi
> I would like to know what's better in C# compact framework programming
[quoted text clipped - 9 lines]
>
> Thanks
Adam - 30 Oct 2007 18:53 GMT
Dnia Tue, 30 Oct 2007 09:31:24 -0700, William Vaughn napisał(a):
> It does not make much difference--BUT, when the connection is closed for the
> last time, the engine compacts the database. This means that no matter what
> strategy you choose, you need to make sure to leave at least one connection
> open until the application is ready to end.
In fact i've used sqlce 2.0 so the engine doesn't compact the database.I've
read that constant opening and closing (with dispose) cause taking too much
place in the memory. So, as long as i use only open and close (without
dispose) everything is ok?