Re: Reinitializing client database
- From: "William Vaughn \(MVP\)" <billva@xxxxxxxxxxxxxxx>
- Date: Thu, 26 Feb 2009 10:18:05 -0800
Yes, thanks but what if I have other (unsynchronized) data on the database? It would be nice if there were a way to say "Okay, resync and bring the local database up to speed with the server."
--
__________________________________________________________________________
William R. Vaughn
President and Founder Beta V Corporation
Author, Mentor, Dad, Grandpa
Microsoft MVP
(425) 556-9205 (Pacific time)
Hitchhiker’s Guide to Visual Studio and SQL Server (7th Edition)
http://betav.com http://betav.com/blog/billva
____________________________________________________________________________________________
"ErikEJ" <ErikEJ@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message news:23F8E683-B888-4EF6-A21A-5857717C1478@xxxxxxxxxxxxxxxx
Hi,.
i think your only option will be to recreate the client database, and
Synchrinoze anew, for example as shown here:
http://msdn.microsoft.com/en-us/library/bb726022.aspx
public void RecreateClientDatabase()
{
using (SqlCeConnection clientConn = new
SqlCeConnection(this.ClientConnString))
{
if (File.Exists(clientConn.Database))
{
File.Delete(clientConn.Database);
}
}
SqlCeEngine sqlCeEngine = new SqlCeEngine(this.ClientConnString);
sqlCeEngine.CreateDatabase();
}
--
Erik Ejlskov Jensen - MCTS: Mobile App Dev
"William Vaughn (MVP)" wrote:
I'm using the Local Data Cache (setup for BiDi sync) but from time to time I cannot synchronize. The internal error says to "reinitialize" the client database. To correct the problem I have to go into the IDE and restart the Local Data Cache .sync designer and let it run sync from there. How is this done programmatically?
--
__________________________________________________________________________
William R. Vaughn
President and Founder Beta V Corporation
Author, Mentor, Dad, Grandpa
Microsoft MVP
(425) 556-9205 (Pacific time)
Hitchhiker's Guide to Visual Studio and SQL Server (7th Edition)
http://betav.com http://betav.com/blog/billva
____________________________________________________________________________________________
- References:
- Reinitializing client database
- From: William Vaughn \(MVP\)
- RE: Reinitializing client database
- From: ErikEJ
- Reinitializing client database
- Prev by Date: RE: Reinitializing client database
- Next by Date: Problem dependecies with refrence SqlServerCe.dll
- Previous by thread: RE: Reinitializing client database
- Next by thread: Problem dependecies with refrence SqlServerCe.dll
- Index(es):
Relevant Pages
|