本文介绍了如何在gridview中显示查询结果的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
大家好
请检查以下代码
Hi all
Please check the below code
If (DateTime.Now = "01/01/2013") Then
Dim sql00 = "select sum(EL),sum(ML) from attendance where Emp_name = '" + ComboBox1.Text + "'"
Dim sql000 = sql00 + " SELECT 15+ sum(EL) as el, 14 + sum(ML) as ml from attendance where Emp_name = '" + ComboBox1.Text + "' "
DataGridView2.Rows.Add(sql000)
End If
请告诉我代码是否正确,我想将sql000的值显示给现有的gridview ...
请告诉我该怎么做..
Please tell me whether the code is correct or not and i want to display the value of sql000 to a existing gridview...
please tell me how to do it..
推荐答案
select sum(EL),sum(ML),15+ sum(EL) as el, 14 + sum(ML) as ml from attendance where Emp_name = '" + ComboBox1.Text + "'"
这篇关于如何在gridview中显示查询结果的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!