I work with Windows-Mobile and Windows-CE
using SqlCE
and I dont know what better to do.
To open connection when the program open, run any
Nice. The answers are all over the place. Here's what I know from experience and interacting with the SQL Compact team:
So the answer, actually, is both.
Edit
For those interested, a good example of how this works can be seen in the OpenNETCF ORM library. The library, by default, creates a "maintenance" connection that remains open and is used for doing things like schema queries. All other data operations use their own connection. You also have to option to configure the library to reuse a single connection for the life of the Store, or to use a new connection every time it touches the store. Perfomance and behavior has always been best in all of my projects using the default (which is why I made it the default).