TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
vishnuvardhan diyyala
NA
38
115.1k
Retriving data from Ms access table in between two dates by using C#.net
Aug 5 2011 2:34 AM
Dear all,
Here what i actually need is i want to display the data in between two dates in MS Access table by using OLEDB connection through datagridview.here table name in tokendetails and column name in software_1 createddate.Please help me to write code for this problem.
i wrote code as bellow.
string
da.Fill(ds,
dataGridView1.DataSource = ds.Tables[
st =
"select * from tokendetails where software_1createddate between "
+
DateTime
.Parse(
DateTime
.Today.AddDays(-10ToShortDateString()) +
" and "
+
DateTime
.Parse(
DateTime
.Today.AddDays(-1).ToShortDateString()) +
""
;
MessageBox
.Show(st);
OleDbDataAdapter
da =
new
OleDbDataAdapter
(st, con);
DataSet
ds =
new
DataSet
();
"tokendetails"
);
"tokendetails"
];
In between two dates data available in Table.
but i got error as
Syntax error (missing operator) in query expression 'software_1createddate between 01/07/2011 00:00:00 and 16/07/2011 00:00:00'.
for u r referece i send my application and database file in attachment.pls check at u r end and please suggest me the code.
thanks in advance.
Attachment:
vishnu.rar
Reply
Answers (
7
)
How decompile dll to its source code
Enabling textbox2 as data is entered in textbox1