Writing a SQL CE 3.0 desktop repair application that will repairdatabases from the field.

Discussion in 'microsoft.public.sqlserver.ce' started by Jay, Jul 27, 2009.

  1. Jay

    Jay Guest

    Hello All,

    I am writing a desktop application to use when an RMA comes in from
    the field with a database corruption.
    I first do a engine.verify() that the DB is corrupted, that returns
    accurate information.

    as a proof of concept I wrote the desktop application to use the
    SQLServerCe libraries ( as recommeneded on a forum website) to use
    this dll

    Desktop Version:
    C:\Program Files\Microsoft Visual Studio 8\Common7\IDE\PublicAssemblies
    RT Version: v2.0.50727

    when I try to do a engine.Repair() or engine.Compact() the desktop app
    throws this error. NOTE: my databases do not have passwords.

    System.Data.SqlServerCe.SqlCeException was unhandled
    Message="The specified password does not match the database
    Source="SQL Server Compact Edition ADO.NET Data Provider"
    at System.Data.SqlServerCe.SqlCeEngine.ProcessResults(IntPtr
    pError, Int32 hr)
    at System.Data.SqlServerCe.SqlCeEngine.Repair(SEFIXOPTION
    option, String dstConnStr, RepairOption repairOption)
    at System.Data.SqlServerCe.SqlCeEngine.Repair(String
    connectionString, RepairOption options)
    at Desktop.SQL.SqlChecker.AttemptRepair(String destinationPath,
    RepairOption option) in C:\dev\test\DesktopSQLCEtester\SQL
    \SqlChecker.cs:line 59
    at Desktop.SQL.SqlChecker.AttemptRepair(String destinationPath)
    in C:\dev\test\DesktopSQLCEtester\SQL\SqlChecker.cs:line 40
    at DesktopSQLCEtester.frmSQLCeTester.CheckDB(Object state) in C:
    \dev\test\DesktopSQLCEtester\DesktopSQLCEtester\frmMain.cs:line 48
    at System.Threading._ThreadPoolWaitCallback.WaitCallback_Context
    (Object state)
    at System.Threading.ExecutionContext.Run(ExecutionContext
    executionContext, ContextCallback callback, Object state)
    (_ThreadPoolWaitCallback tpWaitCallBack)
    at System.Threading._ThreadPoolWaitCallback.PerformWaitCallback
    (Object state)

    here is the microsoft native error:
    25028 SSCE_M_INVALIDPASSWORD The specified password does not match
    the database password.

    the From and To connectionStrings
    Data Source = C:\dev\test\DesktopSQLCEtester\TestData\6232\6232pn.sdf
    Data Source = C:\dev\test\DesktopSQLCEtester\TestData\6232\6232pn.sdf.

    Engine that created the database:
    Mobile device version:
    C:\Program Files\Microsoft Visual Studio 8\SmartDevices\SDK\\SQL Server
    RT Version: v2.0.50727
    Version: 3.0.3600.0

    Thanks in advance.
    Jay, Jul 27, 2009
    1. Advertisements

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.