Re: What is best SQLCeConnection strategy?
- From: "William Vaughn" <billvaNoSPAM@xxxxxxxxx>
- Date: Tue, 30 Oct 2007 09:31:24 -0700
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.
--
____________________________________
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)
-----------------------------------------------------------------------------------------------------------------------
"Adam" <spamcut@xxxxx> wrote in message news:1pjrll65n5wbt.obzrhks9x5to$.dlg@xxxxxxxxxxxxx
hi
I would like to know what's better in C# compact framework programming
To declare a SQLCeConnection variable as a Static member of
a Class containing functions to MakeConnection and
CloseConnection, or should I just declare it as a Public
member of the above mentioned class containing Connection
code.
And, if better is use a static SQLCeConnection should i use open a
connection once or open before a execute an query and close after it?
Thanks
.
- Follow-Ups:
- Re: What is best SQLCeConnection strategy?
- From: Adam
- Re: What is best SQLCeConnection strategy?
- References:
- What is best SQLCeConnection strategy?
- From: Adam
- What is best SQLCeConnection strategy?
- Prev by Date: Re: Problem SqlCe 30
- Next by Date: Re: What is best SQLCeConnection strategy?
- Previous by thread: What is best SQLCeConnection strategy?
- Next by thread: Re: What is best SQLCeConnection strategy?
- Index(es):
Relevant Pages
|