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
Shovan Saha
NA
321
91.9k
date query problem
Jul 27 2017 2:21 PM
Dear All, please check my code: Why there is no result?
private void btnAdjusted_Click(object sender, EventArgs e)
{
con = new OleDbConnection(conString);
if (comboBoxSelectSuspenseAccount.Text != "")
{
var query = "SELECT * FROM LalData " +
" WHERE " +
" (PaymentDate between '" + dtpFirstDate.Text.ToString() + "' AND '" + dtpLastDate.Text.ToString() + "')" +
"AND " +
"SuspenseAccount like '" + comboBoxEnterSuspenseAccount.SelectedItem.ToString() + "'";
con.Open();
if (dataGridView1.Rows[dataGridView1.Rows.Count - 1].Cells[10].ToString() != "")
{
adapter = new OleDbDataAdapter(query, con);
dt = new DataTable();
adapter.Fill(dt);
dataGridView1.DataSource = dt;
dataGridView1.CurrentCell = dataGridView1.Rows[dataGridView1.Rows.Count - 1].Cells[0];
btnSubmit.Enabled = false;
con.Close();
}
}
Reply
Answers (
2
)
why we cannot able to overload a delegate in c#
Why its doesnt make filter in my query???