本文介绍了WPF和数据库的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我在wpf项目中使用Sqlserver Compact Edition(.sdf文件).当我从前端向数据库中插入任何数据时,它显示成功消息,并且数据也位于前端,但是如果我想在其中查看数据 直接在表格中,那么那里没有显示数据.
I am using Sqlserver Compact Edition (.sdf file) in wpf project .When i m inserting any data from front end to database ,it's showing success message and data also coming on front end but if i want to see data in direct in table then it's not showing data there.
有人可以告诉我问题出在哪里吗?
Can any one tell me where the problem?
谢谢
VD
推荐答案
Hi VD Tripathi,
Hi VD Tripat
您需要致电 SubmitChanges() 插入后在数据上下文中.喜欢
You need to callSubmitChanges() on the data context after you are done with insertion. like
DataContext1.SubmitChanges()
DataContext1.SubmitChanges()
谢谢, 穆罕默德
Thanks, Muhammad
更多推荐
WPF和数据库
发布评论