如何在不使用dataTable的情况下将数据从SQL数据库添加到datagridview [英] How do I add data from a SQL dataBase to a datagridview without using dataTables
本文介绍了如何在不使用dataTable的情况下将数据从SQL数据库添加到datagridview的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我必须升级一个旧的应用程序才能工作,我已经将新用户添加到数据库中使用linq和lambda但是现在如何使用数据表显示数据库中的用户?
I have to upgrade an old application for work and I have gotten it right to add the new user to the database with linq and lambda but now how do I display the users from the database with out using a data table?
推荐答案
基本上我现在使用的是数据表,但我被告知不再使用。
Basically now I use a data table but I was told not to any more.
else if (enteredName.ToString() != selectedName.ToUpper() & newAllocated == false & requiredAllocatedFields() == true &
nameMatch == false)
{
WriteToAllocatedTable("sp_UpdateAllocated", Convert.ToInt32(dGVAllocateds.Rows[iAllocatedRow].Cells[0].Value));
populateAllocatedList();
populateAllocatedCombobox();
dGVAllocateds.Rows[iAllocatedRow].Cells[0].Selected = true;
}
这篇关于如何在不使用dataTable的情况下将数据从SQL数据库添加到datagridview的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文