更新 .Net TableAdapter 后丢失数据
我有一个程序使用我使用 SQL Server Compact Edition 创建的数据库。一切都在更新并且显示良好。然后我决定将 Fill SQL 语句更改为按字段排序。这样做之后我丢失了大部分数据,只剩下 2 条记录。
这2条记录是我在开始构建程序之前在SQL Server Management studio中手动添加的测试记录,我以为我已经删除了它们。有人对发生的事情有任何想法吗?
I had a program working with a database I created using SQL Server Compact Edition. Everything was updating and showing fine. Then I decided to change the Fill SQL statement to order by a field. After doing that I lost most of the data, with only 2 records remaining.
The 2 records were test records I added manually in SQL Server Management studio, before starting to build the program, and I thought I had deleted them. Anybody any ideas of what has happened?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您的 sdf 文件是否在 VS 中设置为内容文件?
如果为 true,则您的应用程序的上次运行可能使用 bin{configuration}\yourdb.sdf 文件。
出于任何原因(清理、重建...),项目中的 sdf 文件可能已重新部署到 bin{configuration} 文件夹...
is your sdf file set as content file in VS ?
if true, the previous run of your app had maybe worked with the bin{configuration}\yourdb.sdf file.
For any reason (clean, rebuild, ...), the sdf file in your project may has been redeployed to the bin{configuration} folder...