简体   繁体   中英

SQL Server CE database not Affected for insert and update

I am writing C# Forms application and using normal SQL Server CE database ( .sdf ).

What happened is that no changes are written to the database. For example when trying to add a row, it will never show up in the database table. But when do the selection, it seems that it does exist !

What is the problem here ?

When you use |DataDirectory| or simply a relative path then you have 2 copies of the SDF file in your project folders.

Your application is using the one in ..\\Root\\bin\\debug .

Your tools (VS server explorer) are looking in ..\\Root .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM