两个日期之间的数据源accdb数据库SQL ??? [英] Datasource accdb database SQL between two dates ???
问题描述
你好
我在Visual Studio 2010中制作的C#中有windowsform,数据源是ACCESS 2007 accdb数据库.我有两个日期时间选择器的报告,我加入了F_date
和T_ date
,但是SQL无法正常工作,特别是@F_date
和@T_date
.
似乎 @ 与accdb
源文件不兼容
因为当我制作不带accdb的新表作为数据源时,它就可以工作了
我需要有关sql的帮助
下面是我正在谈论的sql,我将问题加粗了
Hello
I have windowsform in C# made in Visual Studio 2010, datasource is ACCESS 2007 accdb database. I have report with two datetime pickers which I joined F_date
and T_ date
but SQL doesnt work, specifically @F_date
And @T_date
.
it seems that @ doesnt work with accdb
source file
because when I made new table without accdb as datasource then it works
I need help with the sql
down here is the sql that I am talking about, I bold the problem
SELECT RB, Bankomat, Datum_otvaranja, Vreme_prijave, ProView_vreme, Naziv_dogadjaja, Preduzeta_mera, Napomena FROM dnevni_izvestaj
WHERE Datum_otvaranja BETWEEN @F_date And @T_date
[已编辑]代码在前置"标签中被阻止[/已编辑]
Code is blocked in "pre" tags[/Edited]
推荐答案
您是通过Odbc还是OleDb查询?如果是这样,则应使用问号作为参数指示.
请参见使用参数占位符的部分
[ ^ ] :)
Are you querying over Odbc or OleDb? If so, then you should use a question-mark as a parameter-indication.
See the section Working with Parameter Placeholders
[^] :)
这篇关于两个日期之间的数据源accdb数据库SQL ???的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!