SQL Fill查询如何使其工作? [英] Sql Fill query how to get it working?
本文介绍了SQL Fill查询如何使其工作?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
嘿,我想过滤我的数据网格,所以我用以下内容填充了一个查询
Hey i want to filter my datagrid so i have put done a query in the fill with the following
SELECT id, cardNumber, transactionType, transactionAmount, transactionDate
FROM [Log]
WHERE (cardNumber = @cardNumber) AND (transactionDate = GETDATE() - 7)
这是我当时使用的代码
this is the code i am using then
Show2 show2 = new Show2();
public Form3()
{
InitializeComponent();
}
private void Form3_Load(object sender, EventArgs e)
{
logTableAdapter1.Fill(boGDataSet1.Log, show2.cardNumber.ToString());
}
这不起作用,因为当我加载表单时,它给了我一个空白的数据网格,并且不确定我在做什么错
This is not working as when i load the form it give me a blank datagrid and am not sure what i am doing wrong
推荐答案
有关DataGridView的更多提示和技巧可以在此处找到 [ ^ ]
more hints and tips about DataGridView can be found here[^]
这篇关于SQL Fill查询如何使其工作?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文