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

  • Home
  • SEARCH
  • 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 5842491
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T12:01:29+00:00 2026-05-22T12:01:29+00:00

I’m building an application in WPF (.NET 4) My application creates, opens and saves

  • 0

I’m building an application in WPF (.NET 4)

My application creates, opens and saves data files with a custom extension (I’ll refer to them as .myapp files for clarity here). I’m using an installer project to associate .myapp files with my installed program, and I’ve given them their own icon / actions / etc.)

A .myapp file is quite simply a SQLCE 3.5 database file with the extension changed from .sdf to .myapp.

It’s working, but I’m looking for advice on whether this is a good way of doing things.

Part of me wonders whether I should make a .myapp file a wrapper file, which contains the SDF as well as some metadata. I presume in doing it that way, that I would need to load the SDF into memory when I open the file, and then take responsibility for ‘saving’ it back to the file. My reasons for considering this option are:

  1. It would allow me to store additional metadata alongside the sdf, like intended application version, other quickly readable properties, etc.
  2. It would allow me open files in read-only mode (i.e. by not saving them back)
  3. It would (moreso) protect against somebody renaming the extension to .sdf and opening it with SQL Management Studio and messing around with the data.

Would this be a possible/better approach? By having the SDF loaded into memory, would I see performance benefits? Would there be any pitfalls to look out for?

Any other advice appreciated!

  • 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-22T12:01:30+00:00Added an answer on May 22, 2026 at 12:01 pm

    Using a custom document extension on your sdf files is an excellent idea. It would not work to wrap the sdf file in another file, and “load in memory”, however, as you can only specify a file path in the SQL Server Compact connectionstring. The SQL Server Compact engine manages “loading in memory” for you and flushes to disk as required.

    1: You could do this by storing the metatdata in a table/tables in the sdf file.
    2: Opeining in read-only mode is a connection string option, so you can do that by changing the connection string.
    3: You can specifiy a Password for the file (also in the connection string), and this will encrypt the database file.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

link Im having trouble converting the html entites into html characters, (&# 8217;) i
We're building an app, our first using Rails 3, and we're having to build
I'm parsing an RSS feed that has an ’ in it. SimpleXML turns this
I want to construct a data frame in an Rcpp function, but when I
I have thousands of HTML files to process using Groovy/Java and I need to
I have a string like this: La Torre Eiffel paragonata all’Everest What PHP function
I have a bunch of posts stored in text files formatted in yaml/textile (from
I have some data like this: 1 2 3 4 5 9 2 6
That's pretty much it. I'm using Nokogiri to scrape a web page what has
I have just tried to save a simple *.rtf file with some websites and

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.