WPF和数据库

编程入门 行业动态 更新时间:2024-10-28 11:29:32
本文介绍了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和数据库

本文发布于:2023-07-16 07:33:09,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1119407.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:数据库   WPF

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!