WPF 4.5数据库连接 [英] WPF 4.5 Database Connection

查看:53
本文介绍了WPF 4.5数据库连接的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有人可以提供如何使用Visual Studio 2012在WPF 4.5中创建示例数据库应用程序的参考。另外,请提供操作连接字符串的参考。



我的要求是使用表格中的数据加载网格视图。



先谢谢。

解决方案

您好,



看看这里:

使用SQL Server数据库的WPF DataGrid控件中的数据绑定 [ ^ ]


演练:连接到本地数据库文件中的数据(Windows窗体)

http://msdn.microsoft.com/en-us/library/vstudio/ms171890.aspx [ ^ ]



< b>使用命令对象执行返回行的SQL语句

http://msdn.microsoft.com/en-us/library/vstudio/fksx3b4f.aspx [ ^ ]

Could someone please provide a reference of how to create a sample database application in WPF 4.5 using Visual Studio 2012. Also, please provide the reference of manipulating the connection string.

My requirement is to load a grid view with data from the table.

Thanks in Advance.

解决方案

Hi,

Have a look here:
Data binding in WPF DataGrid control using SQL Server database[^]


Walkthrough: Connecting to Data in a Local Database File (Windows Forms)
http://msdn.microsoft.com/en-us/library/vstudio/ms171890.aspx[^]

Executing SQL Statements that Return Rows Using a Command Object
http://msdn.microsoft.com/en-us/library/vstudio/fksx3b4f.aspx[^]


这篇关于WPF 4.5数据库连接的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆