• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1507
  • Last Modified:

Getting "The specified module could not be found" error when compacting SQL CE database.


I'm trying to programatically change a SQL CE Database's password. I found that the only way to do this is by compacting the DB, by calling the Compact() method while passing a new connection string with the new password.
This seems to be working fine when I test it using the Emulator, but I get a "The specified module could not be found" error when I test it on a physical PPC device. The error seems to happen when the Compact method is called.

Any ideas?

System.Data.SqlServerCe.SqlCeException was unhandled
  Message="The specified module could not be found."
  Source="SQL Server Compact ADO.NET Data Provider"
    at System.Data.SqlServerCe.SqlCeEngine.ProcessResults()
    at System.Data.SqlServerCe.SqlCeEngine.Repair()
    at System.Data.SqlServerCe.SqlCeEngine.Compact()

Open in new window

1 Solution
 Do you have the SQL Compact runtime installed, and, do you have the sqlcecompactxx.dll and sqlcesexx.dll in your device?
Mariano77Author Commented:
The SQL runtime is installed - if I comment out the Compact() method in my code, the app runs fine.
Where do I check for those 2 dlls?

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now