随笔分类 -  DataSetTableGridView

datagridview连接数据库的简单实现
摘要:对于需要从数据库获取数据的列,在DataPropertyName填写对应的列名字.在Load函数中添加如下代码,先关闭自动生成列选项,然后得到一个查询的datatable,并将其绑定到datasource//关闭自动生成列fdataview.AutoGenerateColumns = false;D... 阅读全文

posted @ 2015-09-22 09:25 飞翔蚂蚁 阅读(2022) 评论(0) 推荐(0)

DataGridView 绑定List<>数据的更新
摘要:使用BindingSource做为中间数据源,使用bindingSource1.DataSource = productOrderList;dataGridView1.DataSource = bindingSource1;当增加,修改,删除List数据后,使用bindingSource1.Rese... 阅读全文

posted @ 2015-05-03 18:05 飞翔蚂蚁 阅读(1688) 评论(0) 推荐(0)

ForeignKeyConstraint 外键约束的使用及作用的学习[转]
摘要:原文链接 da.SelectCommand.CommandText="select au_id,au_fname,au_lname from authors"; da.Fill(ds,"Author"); da.SelectCommand.CommandText="select au... 阅读全文

posted @ 2015-05-03 15:42 飞翔蚂蚁 阅读(937) 评论(0) 推荐(0)

DataTable数据检索的性能分析[转]
摘要:原文链接作者写得非常好,我学到了许多东西,这里只是转载!我们知道在.NET平台上有很多种数据存储,检索解决方案-ADO.NET Entity Framework,ASP.NET Dynamic Data,XML, NHibernate,LINQ to SQL 等等,但是由于一些原因,如平台限制,比如... 阅读全文

posted @ 2015-05-02 10:25 飞翔蚂蚁 阅读(1579) 评论(1) 推荐(0)

导航