Re: Reinitializing client database

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance



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
____________________________________________________________________________________________


.



Relevant Pages

  • Idiomatic Expressions to Operating System Architecture: Transforming Rigids
    ... <Subject: Re: Idiomatic Expressions to Operating ... <endpoint during a single session * DATABASE + by ... <statements is a new feature of SQL Server 2005. ...
    (sci.math)
  • Re: MS Access DAO -> ADO.NET Migration
    ... William Vaughn ... Microsoft MVP ... Hitchhiker's Guide to Visual Studio and SQL Server ... My migration app works building a SSCE database file with imported data ...
    (microsoft.public.dotnet.framework.adonet)
  • Re: Cluster will not fail over.
    ... > As far as the TCP/IP issue goes, you had to rebuild the cluster and were ... > able to restore the master database. ... > a cluster installation you'll have to revisit. ... >> This worked bringing up the sql server in minimal mode. ...
    (microsoft.public.sqlserver.clustering)
  • Re: MS Access DAO -> ADO.NET Migration
    ... full SQL Server and I see the logic you explained in a multi user ... allow two users to access the same database file Read/Write at any given ... The book was a pleasure to read after the gibberish that Microsoft 'puts ... Hitchhiker's Guide to Visual Studio and SQL Server ...
    (microsoft.public.dotnet.framework.adonet)
  • Re: MS Access DAO -> ADO.NET Migration
    ... For that it is much harder to handle the incremental identifier, ... database but although they have the data, they are not connected at the same ... The book was a pleasure to read after the gibberish that Microsoft 'puts ... SQL Server Management Studio is nowhere to be found on my ...
    (microsoft.public.dotnet.framework.adonet)