Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7628295
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T05:34:32+00:00 2026-05-31T05:34:32+00:00

I am using MS SQL Server compact edition within a project. The client has

  • 0

I am using MS SQL Server compact edition within a project. The client has requested for all data contained in the database to be encrypted. The key for the encryption may be installation-specific or even a global key for all installations, it is more intended as minimal barrier for people that have taken a copy of the sdf and try to read the data contained in it.

Is there a setting within SQL Server CE that enables encryption on the DB or is there no mechanism like that and the application has to take care of encryption of the data on its own?

Thx!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-31T05:34:33+00:00Added an answer on May 31, 2026 at 5:34 am

    i find that (source)

    Use the SQL Server Compact File Encryption Within the SQL Server
    Compact Connection String you can tell the engine to encrypt the
    datafile with a password. By simply specifying a password, the
    database is automatically encrypted. We used to support an encrypt =
    true name/value pair, but it was sort of silly to have a password
    without encryption, and encryption without a password is about as
    useful as putting a lock on a door but leaving the key in the lock (on
    the outside of the door). So, we no longer use this name/value pair
    and will likely throw an error in a future release if the engine sees
    it. Today Compact just ignores it.

    To turn on Encryption, simply set the Password like the following:

    Data Source=|DataDirectory|\Localdatabase.sdf;Password=Foo
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I was using SQL Server Compact Edition (local-database) for my application. But while I
I am using LINQ to SQL with Sql Server Compact Edition 3.5 and VS2008.
I'm new to SQL Server Compact edition. I'm using Compact edition 3.5. I tried
I am using x64 machine so if I embed SQL Server Compact Edition 4.0
I am using SQL Server Compact Edition 3.5 on a mobile device. Synchronisation using
Hey, I am using iBATIS with SQL Server Compact Edition 3.5 and try to
I am using the Entity Framework and SQL Server Compact Edition through the code
I had a program working with a database I created using SQL Server Compact
I have a SQL Server Compact Edition Database file, and I want to display
I have created a database in SQL server Compact Edition. I tried to attach

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.