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 8260935
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T03:13:45+00:00 2026-06-08T03:13:45+00:00

I have WinForms application am building and am using SQL Server Compact Edition 3.5.

  • 0

I have WinForms application am building and am using SQL Server Compact Edition 3.5.

Whenever I run the WinForms application and I have a query editor open in Visual Studio afterwards, any update query I run does not reflect in the application. If I run Select query to view the updated records, I could see from the query result that the data has changed but does not reflect in the application.

If I close the application and run it again the updates reflects in the application.

Is this normal? What is the best explanation for this?

UPDATE

from C#

string sqlceConnString = @"Data Source=|DataDirectory|\medicstores.sdf";

from new Query Connection window in Visual Studio

C:\Users\user12345\...\Visual Studio 2010\Projects\StockPro\StockProFormUI\medicstores.sdf

Update

I think this may be due to the application duplicating the database file copying it to \StockPro\StockProFormUI\bin\Debug\medicstores.sdf instead of using \StockPro\StockProFormUI\medicstores.sdf.

I think |DataDirectory| was resolved to \StockPro\StockProFormUI\bin\Debug\medicstores.sdf by the application which makes it a new copy from the physical file in \StockPro\StockProFormUI\medicstores.sdf and thus they are not the same

  • 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-06-08T03:13:47+00:00Added an answer on June 8, 2026 at 3:13 am

    Check you Connection string first.

    Disconnect your SQL CE database on your server explorer.

    I also had that problem before.
    You need to get where is the exact location of your sqlce database and and then change your connection string.

    Test it first to place you sqlce on your drive c:\ and add Persist Security Info=False; on the end. and use the exact database file path.

    private SqlCeConnection conn = new SqlCeConnection("Data Source=C:\\medicstores.sdf;Persist Security Info=False;"); 
    

    You can use SQL CE Tool to view your SQLCE database instead of using visual studio.

    SQL Server CE Query Tool – Code Porject

    Regards

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

Sidebar

Related Questions

We have a WinForms application that uses SQL server to store its data. To
C# - Winforms - SQL Server i am building an application which displays some
I have Winforms application written in C# which connects to a SQL Server Database.
I am looking at building a client server application in C# using winforms or
I'm building WinForms application using Visual Studio 2010. Every time I make a change
I have a WinForms application which is using Entity Framework to query a database.
I'm building a winforms application using a crystalreportviewer control (version 10.5.3700.0). Application works fine
I am building a Winforms C# 2.0 application. I have successfully been able to
Using VB.net 4.0 I have a Winforms application that is loosely based on MVVM.
I am working on a winforms application using LINQ to SQL - and am

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.