15,917,174 members
Sign in
Sign in
Email
Password
Forgot your password?
Sign in with
home
articles
Browse Topics
>
Latest Articles
Top Articles
Posting/Update Guidelines
Article Help Forum
Submit an article or tip
Import GitHub Project
Import your Blog
quick answers
Q&A
Ask a Question
View Unanswered Questions
View All Questions
View C# questions
View C++ questions
View Javascript questions
View Visual Basic questions
View Python questions
discussions
forums
CodeProject.AI Server
All Message Boards...
Application Lifecycle
>
Running a Business
Sales / Marketing
Collaboration / Beta Testing
Work Issues
Design and Architecture
Artificial Intelligence
ASP.NET
JavaScript
Internet of Things
C / C++ / MFC
>
ATL / WTL / STL
Managed C++/CLI
C#
Free Tools
Objective-C and Swift
Database
Hardware & Devices
>
System Admin
Hosting and Servers
Java
Linux Programming
Python
.NET (Core and Framework)
Android
iOS
Mobile
WPF
Visual Basic
Web Development
Site Bugs / Suggestions
Spam and Abuse Watch
features
features
Competitions
News
The Insider Newsletter
The Daily Build Newsletter
Newsletter archive
Surveys
CodeProject Stuff
community
lounge
Who's Who
Most Valuable Professionals
The Lounge
The CodeProject Blog
Where I Am: Member Photos
The Insider News
The Weird & The Wonderful
help
?
What is 'CodeProject'?
General FAQ
Ask a Question
Bugs and Suggestions
Article Help Forum
About Us
Search within:
Articles
Quick Answers
Messages
Comments by Prateek gsharma (Top 81 by date)
Prateek gsharma
21-Jun-18 13:57pm
View
where should i paste it?
Prateek gsharma
19-Jun-18 0:11am
View
Debugged but still i am unable to find the error.can you plz help me in this?
Prateek gsharma
14-Jun-18 4:13am
View
My Question is "How to sum datagridview selected cell" on label?but still i didn't get solution?
Prateek gsharma
14-Jun-18 4:12am
View
My Question is "How to sum datagridview selected cell" on label?but still i didn't get solution?
Prateek gsharma
13-Jun-18 23:49pm
View
i am trying to entered 0.46 but SV textbox is not allowing me to enter as i have validation as if(sv<=0).i think there may be some other validation needs to be created
Prateek gsharma
12-Jun-18 14:02pm
View
eventhough i have done as you told i am getting same error
private void txtSV_TextChanged(object sender, EventArgs e)
{
if (!double.TryParse(txtSV.Text, out double sv))
{
return;
}
if (sv <= 0.00D)
{
MessageBox.Show("Beginning value must be greater than 0.", "Please Fix These Errors", MessageBoxButtons.OK, MessageBoxIcon.Error);
return;
}
Prateek gsharma
12-Jun-18 6:47am
View
its ok but while i am entering 0.46 as SV & 0.59 as FV......i am getting error like Begining value must be greater than zero....this is wrong because i should enter 0.41 or 0.11 as SV & FV & i should not get any error.can you plz help me resolving this problem?
Prateek gsharma
12-Jun-18 3:02am
View
its ok but while i am entering 0.46 as SV & 0.59 as FV......i am getting error like Begining value must be greater than zero....this is wrong because i should enter 0.41 or 0.11 as SV & FV & i should not get any error.can you plz help me resolving this problem?
Prateek gsharma
8-Jun-18 7:23am
View
it works like SQL only.as i am updating data in Datagriview using button in datagridview
Prateek gsharma
8-Jun-18 7:04am
View
moreover i am using this query in Datagridview where i have change the values & update it in database.
Prateek gsharma
8-Jun-18 7:04am
View
moreover i am using this query in Datagridview where i have change the values & update it in database.
Prateek gsharma
8-Jun-18 7:03am
View
moreover i am using this query in Datagridview where i have change the values & update it in database.
Prateek gsharma
8-Jun-18 0:53am
View
string query1 = ("Update Reports set Comments = @comments,marks = @marks,Reviewer = @rvr,ReviewerDate = @rvrd Where (ID = @id)");
In the access database
ID data type is AutoNumber
ID field size Long Integer
New values : Increment
But above query is not making any changes to perticular column/Row
is there any other query to make changes in database?
Prateek gsharma
8-Jun-18 0:53am
View
string query1 = ("Update Reports set Comments = @comments,marks = @marks,Reviewer = @rvr,ReviewerDate = @rvrd Where (ID = @id)");
In the access database
ID data type is AutoNumber
ID field size Long Integer
New values : Increment
But above query is not making any changes to perticular column/Row
is there any other query to make changes in database?
Prateek gsharma
8-Jun-18 0:52am
View
string query1 = ("Update Reports set Comments = @comments,marks = @marks,Reviewer = @rvr,ReviewerDate = @rvrd Where (ID = @id)");
In the access database
ID data type is AutoNumber
ID field size Long Integer
New values : Increment
But above query is not making any changes to perticular column/Row
is there any other query to make changes in database?
Prateek gsharma
7-Jun-18 13:21pm
View
no one able to solve my issue?
Prateek gsharma
7-Jun-18 13:20pm
View
yes
Prateek gsharma
7-Jun-18 12:58pm
View
i passed it correctly but it is not updating any values
Prateek gsharma
7-Jun-18 12:16pm
View
no error.but only earlier values are displaying
Prateek gsharma
7-Jun-18 12:14pm
View
even though made changes to my query.....values are not updated.
no change in values.this query is not updating any values
Prateek gsharma
7-Jun-18 12:12pm
View
private void dataGridView1_CellContentClick(object sender, DataGridViewCellEventArgs e)
{
if (dataGridView1.Columns[e.ColumnIndex].Name == "Submit")
{
using (OleDbConnection con1 = new OleDbConnection(con))
{
con1.Open();
for (int i = 0; i < dataGridView1.Rows.Count; i++)
{
OleDbCommand cmd = new OleDbCommand();
cmd.Connection = con1;
//string query1 = ("insert into Reports (ID,Comments,marks,Reviewer,ReviewerDate) values(@id,@comments,@marks,'" + Environment.UserName + "',Now)");
string query1 = ("Update Reports set Comments = @comments,marks = @marks,Reviewer = @rvr,ReviewerDate = @rvrd Where (ID = @id)");
cmd.Parameters.AddWithValue("@id", dataGridView1.Rows[i].Cells[0].Value);
cmd.Parameters.AddWithValue("@comments", dataGridView1.Rows[i].Cells[5].Value);
cmd.Parameters.AddWithValue("@marks", dataGridView1.Rows[i].Cells[6].Value);
cmd.Parameters.AddWithValue("@rvr", dataGridView1.Rows[i].Cells[8].Value);
cmd.Parameters.AddWithValue("@rvrd", dataGridView1.Rows[i].Cells[9].Value);
cmd.CommandText = query1;
cmd.ExecuteNonQuery();
}
MessageBox.Show("Comments Submitted", "Message", MessageBoxButtons.OK, MessageBoxIcon.Information);
}
}
Prateek gsharma
7-Jun-18 12:08pm
View
now i have done like above but i unable to update the changes to my row.
Prateek gsharma
7-Jun-18 12:03pm
View
if i do so....it is not updating in database.
Prateek gsharma
6-Jun-18 13:40pm
View
thank you sir.
Prateek gsharma
6-Jun-18 4:13am
View
i am getting minus symbol as result while entering SV = 21,FV = 20 NOY = 3
Prateek gsharma
6-Jun-18 1:23am
View
any vlaues if we enter SV > FV.....getting result as -(Minus)
Prateek gsharma
5-Jun-18 14:29pm
View
if SV greater than FV then i am getting nothing just displaying "-".
can any solve this sir?
Prateek gsharma
5-Jun-18 11:23am
View
same error is displaying sir
Prateek gsharma
5-Jun-18 1:59am
View
can i use cmd.Parameters.Add for insert command?
Prateek gsharma
5-Jun-18 1:05am
View
ok
Prateek gsharma
3-Jun-18 9:20am
View
i am unable to solve this sir.
send me the correct code sir.
Prateek gsharma
3-Jun-18 8:24am
View
Deleted
private void button1_Click(object sender, EventArgs e)
{
using (OleDbConnection con1 = new OleDbConnection(con))
{
OleDbCommand cmd = new OleDbCommand();
OleDbDataAdapter da;
DataSet ds = new DataSet();
if ((textBox4.Text == string.Empty) || (textBox5.Text == string.Empty) || (comboBox1.Text == string.Empty) || (comboBox2.Text == string.Empty))
{
MessageBox.Show("Please enter Your All the Details in the Related Fields ...!!!!!", "Message", MessageBoxButtons.OK, MessageBoxIcon.Warning);
}
else
{
cmd = new OleDbCommand("SELECT * from Spldetails where Date = @d1 and EmpId = @v1 and Splwrk = @c1 and Splwrkdetails = @sd", con1);
da = new OleDbDataAdapter(cmd);
da.SelectCommand.Parameters.Add("@v1", OleDbType.Variant, 30).Value = this.textBox1.Text;
da.SelectCommand.Parameters.Add("@d1", OleDbType.Date).Value = this.dateTimePicker1.Text;
da.SelectCommand.Parameters.Add("@c1", OleDbType.Variant, 100).Value = this.comboBox1.Text;
da.SelectCommand.Parameters.Add("@sd", OleDbType.Variant, 300).Value = this.textBox6.Text;
da.Fill(ds);
int i = ds.Tables[0].Rows.Count;
if (i > 0)
{
MessageBox.Show("Duplicate Details !!!! You have already Submitted your details on " + dateTimePicker1.Text + ".");
//ds.Clear();
textBox4.Text = "";
textBox5.Text = "";
textBox6.Text = "";
comboBox1.Text = "";
comboBox2.Text = "";
}
else
{
try
{
string query1 = "INSERT INTO Spldetails([Date],[EmpId],[EmpName],[Designation],[Records],[Splwrkhrs],[Team],[Splwrk],[Splwrkdetails],[Allottedby]) VALUES(@d1,@v1,@v2,@dg,@rd,@shr,@tm,@sw,@sd,@ab)";
cmd = new OleDbCommand(query1, con1);
da = new OleDbDataAdapter(cmd);
da.SelectCommand.Parameters.Add("@v1", OleDbType.Variant, 30).Value = this.textBox1.Text;
da.SelectCommand.Parameters.Add("@v2", OleDbType.Variant, 100).Value = this.textBox2.Text;
da.SelectCommand.Parameters.Add("@dg", OleDbType.Variant, 50).Value = this.textBox3.Text;
da.SelectCommand.Parameters.Add("@rd", OleDbType.Variant, 15).Value = Convert.ToDouble(this.textBox4.Text);
da.SelectCommand.Parameters.Add("@shr", OleDbType.Variant, 15).Value = Convert.ToDouble(this.textBox5.Text);
da.SelectCommand.Parameters.Add("@tm", OleDbType.Variant, 100).Value = this.textBox8.Text;
da.SelectCommand.Parameters.Add("@d1", OleDbType.Date).Value = this.dateTimePicker1.Text;
da.SelectCommand.Parameters.Add("@ab", OleDbType.Variant, 100).Value = this.comboBox1.Text;
da.SelectCommand.Parameters.Add("@sw", OleDbType.Variant, 100).Value = this.comboBox2.Text;
da.SelectCommand.Parameters.Add("@sd", OleDbType.Variant, 300).Value = this.textBox6.Text;
cmd.ExecuteNonQuery();
con1.Close();
MessageBox.Show("Congratulations....Your Details have been submitted successfully");
textBox4.Text = "";
Prateek gsharma
3-Jun-18 8:23am
View
private void button1_Click(object sender, EventArgs e)
{
using (OleDbConnection con1 = new OleDbConnection(con))
{
OleDbCommand cmd = new OleDbCommand();
OleDbDataAdapter da;
DataSet ds = new DataSet();
if ((textBox4.Text == string.Empty) || (textBox5.Text == string.Empty) || (comboBox1.Text == string.Empty) || (comboBox2.Text == string.Empty))
{
MessageBox.Show("Please enter Your All the Details in the Related Fields ...!!!!!", "Message", MessageBoxButtons.OK, MessageBoxIcon.Warning);
}
else
{
cmd = new OleDbCommand("SELECT * from Spldetails where Date = @d1 and EmpId = @v1 and Splwrk = @c1 and Splwrkdetails = @sd", con1);
da = new OleDbDataAdapter(cmd);
da.SelectCommand.Parameters.Add("@v1", OleDbType.Variant, 30).Value = this.textBox1.Text;
da.SelectCommand.Parameters.Add("@d1", OleDbType.Date).Value = this.dateTimePicker1.Text;
da.SelectCommand.Parameters.Add("@c1", OleDbType.Variant, 100).Value = this.comboBox1.Text;
da.SelectCommand.Parameters.Add("@sd", OleDbType.Variant, 300).Value = this.textBox6.Text;
da.Fill(ds);
int i = ds.Tables[0].Rows.Count;
if (i > 0)
{
MessageBox.Show("Duplicate Details !!!! You have already Submitted your details on " + dateTimePicker1.Text + ".");
//ds.Clear();
textBox4.Text = "";
textBox5.Text = "";
textBox6.Text = "";
comboBox1.Text = "";
comboBox2.Text = "";
}
else
{
try
{
string query1 = "INSERT INTO Spldetails([Date],[EmpId],[EmpName],[Designation],[Records],[Splwrkhrs],[Team],[Splwrk],[Splwrkdetails],[Allottedby]) VALUES(@d1,@v1,@v2,@dg,@rd,@shr,@tm,@sw,@sd,@ab)";
cmd = new OleDbCommand(query1, con1);
da = new OleDbDataAdapter(cmd);
da.SelectCommand.Parameters.Add("@v1", OleDbType.Variant, 30).Value = this.textBox1.Text;
da.SelectCommand.Parameters.Add("@v2", OleDbType.Variant, 100).Value = this.textBox2.Text;
da.SelectCommand.Parameters.Add("@dg", OleDbType.Variant, 50).Value = this.textBox3.Text;
da.SelectCommand.Parameters.Add("@rd", OleDbType.Variant, 15).Value = Convert.ToDouble(this.textBox4.Text);
da.SelectCommand.Parameters.Add("@shr", OleDbType.Variant, 15).Value = Convert.ToDouble(this.textBox5.Text);
da.SelectCommand.Parameters.Add("@tm", OleDbType.Variant, 100).Value = this.textBox8.Text;
da.SelectCommand.Parameters.Add("@d1", OleDbType.Date).Value = this.dateTimePicker1.Text;
da.SelectCommand.Parameters.Add("@ab", OleDbType.Variant, 100).Value = this.comboBox1.Text;
da.SelectCommand.Parameters.Add("@sw", OleDbType.Variant, 100).Value = this.comboBox2.Text;
da.SelectCommand.Parameters.Add("@sd", OleDbType.Variant, 300).Value = this.textBox6.Text;
cmd.ExecuteNonQuery();
con1.Close();
MessageBox.Show("Congratulations....Your Details have been submitted successfully");
textBox4.Text = "";
Prateek gsharma
3-Jun-18 7:35am
View
still i am getting same error
Prateek gsharma
3-Jun-18 7:14am
View
if i remove con1.open(); from try block i am getting data type mismatch error
i am not understanding what to do in this case?
Prateek gsharma
3-Jun-18 7:06am
View
i am getting this error in try block sir
Prateek gsharma
1-Jun-18 7:14am
View
wher should i replace this code sir?
Prateek gsharma
1-Jun-18 2:02am
View
ok i will try sir.
Prateek gsharma
1-Jun-18 1:32am
View
how to update my access
Prateek gsharma
1-Jun-18 1:31am
View
u mean to say i have to use parameterized queries.ok i will use now.
tell me the solution sir?
Prateek gsharma
1-Jun-18 0:52am
View
You mean to say ..i have to modify file name as videodata.mdb.
but the default access database name ends with accdb right?
Prateek gsharma
1-Jun-18 0:39am
View
i knew that sir....this is the sample code sir........i always use parameterized queries only.
just i want why i am getting above error.
Prateek gsharma
30-May-18 2:12am
View
anyone plz reply me?
Prateek gsharma
25-May-18 9:43am
View
sum(dgr=>dgr.Cells[6].Value);
now i am getting "method name expected" error
Prateek gsharma
25-May-18 9:41am
View
Sum(dgr=>dgr.Cells[6].Value)
still not working
Prateek gsharma
24-May-18 13:44pm
View
i am getting error like "cannot apply indexing with[] to an expression of type "datagridview"....
can i provide you attachment to see my exact requirment?how attach word docs to this page?
Prateek gsharma
22-May-18 6:41am
View
ere i am getting total sum marks column using above code...but requirement is if i select 1 cell then it should display that value only...if i select 2 cells of marks column then it should be displayed sum of 2 cells only... & so on....
Prateek gsharma
21-May-18 10:00am
View
can any one help me?
Prateek gsharma
19-May-18 1:54am
View
then what to do in this case.
Prateek gsharma
19-May-18 1:52am
View
here i am getting total sum marks column using above code...but requirement is if i select 1 cell then it should display that value only...if i select 2 cells of marks column then it should be displayed sum of 2 cells only... & so on....
Prateek gsharma
18-May-18 14:13pm
View
if i enter negative values in txtFV.text i should get alert or error but i am not getting any error message
Prateek gsharma
18-May-18 14:12pm
View
private void txtFV_TextChanged(object sender, EventArgs e)
{
if (!double.TryParse(txtFV.Text, out double fv))
{
return;
}
if (fv >= 0D)
{
MessageBox.Show("Ending Value must be greater than or equal to 0.", "Please fix these errors", MessageBoxButtons.OK, MessageBoxIcon.Error);
return;
}
Prateek gsharma
18-May-18 14:02pm
View
hi sir,
if i entered negative value in any of the textbox i am not getting any result. just getting NAN.
Prateek gsharma
18-May-18 5:13am
View
i want to validate txtSV.text as txtSV.Text should not be equal to zero .if txtSV ==0 then error message should be displayed
if (Convert.ToDouble(txtSV.Text) == 0)
{
MessageBox.Show("Beginning value must be greater than 0.", "Please fix these errors", MessageBoxButtons.OK, MessageBoxIcon.Error);
}
Prateek gsharma
17-May-18 13:49pm
View
Thank you rechard.i understood now.its working now.
Prateek gsharma
17-May-18 13:26pm
View
I am getting error as "operator ^ can not be used for datatype double & double
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using System.IO;
namespace CAGRcalc
{
public partial class Form1 : Form
{
double SV, FV,NoY,X,Y,Z;
double Result;
private void button2_Click(object sender, EventArgs e)
{
SV = Convert.ToDouble(txtSV.Text);
FV = Convert.ToDouble(txtFV.Text);
NoY = Convert.ToDouble(txtNoY.Text);
X = Convert.ToDouble(FV / SV);
Y = Convert.ToDouble(1 / NoY);
Z = (X^Y) - (1);
Result = Convert.ToDouble(Z * (100));
txtResult.Text = Result.ToString();
}
public Form1()
{
InitializeComponent();
}
}
}
Prateek gsharma
8-May-18 13:30pm
View
eventhough its not working.
Prateek gsharma
28-Apr-18 10:45am
View
Deleted
private void dataGridView1_CellContentClick(object sender, DataGridViewCellEventArgs e)
{
if (dataGridView1.Columns[e.ColumnIndex].Name == "Submit")
{
using (OleDbConnection con1 = new OleDbConnection(con))
{
con1.Open();
for (int i = 0; i < dataGridView1.Rows.Count; i++)
{
cmd = new OleDbCommand();
cmd.Connection = con1;
string query1 = "Update Spldetails set ID = @id,Status = @sts,Comment =@cmnt,Approvedhrs =@aphr,Reviewer = ('" + label5.Text + "'),Revieweddate = ('"+dateTimePicker3.Value+"') where ID =@id";
cmd.Parameters.AddWithValue("@id", dataGridView1.Rows[i].Cells[0].Value);
cmd.Parameters.AddWithValue("@sts", dataGridView1.Rows[i].Cells[11].Value);
cmd.Parameters.AddWithValue("@cmnt", dataGridView1.Rows[i].Cells[12].Value);
cmd.Parameters.AddWithValue("@aphr", dataGridView1.Rows[i].Cells[13].Value);
cmd.Parameters.AddWithValue("('" + label5.Text + "')", dataGridView1.Rows[i].Cells[14].Value);
cmd.Parameters.AddWithValue("('" + dateTimePicker3.Value + "')", dataGridView1.Rows[i].Cells[15].Value);
cmd.CommandText = query1;
cmd.ExecuteNonQuery();
//spldetailsBindingSource.EndEdit();
//spldetailsTableAdapter.Update(updatedata);
}
MessageBox.Show("Your Details have been Submitted successfully....!", "Message", MessageBoxButtons.OK, MessageBoxIcon.Information);
}
}
its working but i am updating for one row & it has updated Reviewer & revieweddate for all the rows.
can anyone please solve my problem sir?.
Prateek gsharma
28-Apr-18 10:39am
View
yes CellContentClick is properly wired.
Submit is the button column name.
Prateek gsharma
26-Apr-18 4:24am
View
Deleted
still not working
Prateek gsharma
20-Apr-18 1:34am
View
ok
Prateek gsharma
19-Apr-18 13:06pm
View
Now i am getting like this
System.Data.OleDb.OleDbException: 'Data type mismatch in criteria expression.'
Prateek gsharma
16-Apr-18 0:15am
View
No one able to solve my Issue?
Prateek gsharma
13-Apr-18 13:53pm
View
Error Message : System.Data.OleDb.OleDbException: 'No value given for one or more required parameters
Prateek gsharma
12-Apr-18 14:41pm
View
Still i am getting same error while debugging
private void textBox1_TextChanged(object sender, EventArgs e)
{
//Format(dateTimePicker1.Value, "mm/dd/yyyy");
if(comboBox1.Text == "ID")
{
OleDbDataAdapter da = new OleDbDataAdapter("select * from Spldetails where ID like '% @v1 %' and DDate between @d1 and @d2", con);
cmd.Parameters.Add("@v1", OleDbType.VarChar, 30).Value = this.textBox1.Text;
cmd.Parameters.Add("@d1", OleDbType.Date).Value = this.dateTimePicker1.Text;
cmd.Parameters.Add("@d2", OleDbType.Date).Value = this.dateTimePicker2.Text;
OleDbCommandBuilder build = new OleDbCommandBuilder(da);
DataTable dt = new DataTable();
da.Fill(dt);
dataGridView1.DataSource = dt;
//DataSet ds = new DataSet();
//da.Fill(ds, "Spldetails");
//dataGridView1.DataSource = ds.Tables["Spldetails"];
}
if (comboBox1.Text == "Empid")
{
OleDbDataAdapter da = new OleDbDataAdapter("select * from Spldetails where EmpId like '%@v1%' and DDate between @d1 and @d2", con);
cmd.Parameters.Add("@v1", OleDbType.VarChar, 30).Value = this.textBox1.Text;
cmd.Parameters.Add("@d1", OleDbType.Date).Value = this.dateTimePicker1.Text;
cmd.Parameters.Add("@d2", OleDbType.Date).Value = this.dateTimePicker2.Text;
OleDbCommandBuilder build = new OleDbCommandBuilder(da);
DataTable dt = new DataTable();
//DataSet ds = new DataSet();
da.Fill(dt);
dataGridView1.DataSource = dt;
//da.Fill(ds, "Spldetails");
//dataGridView1.DataSource = ds.Tables["Spldetails"];
}
}
Prateek gsharma
12-Apr-18 6:25am
View
i will try sir
Prateek gsharma
11-Apr-18 15:08pm
View
Error Message : System.Data.OleDb.OleDbException: 'No value given for one or more required parameters.'
My Code :
private void textBox1_TextChanged(object sender, EventArgs e)
{
//Format(dateTimePicker1.Value, "mm/dd/yyyy");
if(comboBox1.Text == "ID")
{
OleDbDataAdapter da = new OleDbDataAdapter("select * from Spldetails where ID like '%" + textBox1.Text + "%' and Date >= ('"+(dateTimePicker1.Value.ToString("mm/dd/yyyy"))+ "') and Date <= ('" + (dateTimePicker2.Value.ToString("mm/dd/yyyy")) + "')", con);
OleDbCommandBuilder build = new OleDbCommandBuilder(da);
DataSet ds = new DataSet();
da.Fill(ds, "Spldetails");
dataGridView1.DataSource = ds.Tables["Spldetails"];
}
if (comboBox1.Text == "Empid")
{
OleDbDataAdapter da = new OleDbDataAdapter("select * from Spldetails where EmpId like '%" + textBox1.Text + "%' and Date >= ('" + (dateTimePicker1.Value.ToString("mm/dd/yyyy")) + "') and Date <= ('" + (dateTimePicker2.Value.ToString("mm/dd/yyyy")) + "'))", con);
OleDbCommandBuilder build = new OleDbCommandBuilder(da);
DataSet ds = new DataSet();
da.Fill(ds, "Spldetails");
dataGridView1.DataSource = ds.Tables["Spldetails"];
}
}
Prateek gsharma
11-Apr-18 14:05pm
View
sir,
if my query is like below then it is not giving any results
"select * from Item where Item_code like '" + txtName.Text + "%' and date between '"+todatetimepicker.value.tostring("dd-MM-yyyy")+"' and '"+fromdatetimepicker.value.tostring("dd-MM-yyyy")+"'";
finally datagridview is not giving any result.
what to do in this case?
Prateek gsharma
9-Apr-18 6:02am
View
var strExpr = "Select * from Finaldetails where ('"+this.combobox.selecteditem+"' and Like '%" + this.textBox1.Text + "%' AND Date between '"+this.Datetimepicker1.values.ToString("yyyy/MM/dd")+"' and '"+this.Datetimepicker2.values.ToString("yyyy/MM/dd")+"'";
Prateek gsharma
8-Apr-18 14:20pm
View
the query does not returns results.
yes there are rows in datatable.
Prateek gsharma
7-Apr-18 15:38pm
View
i used this but still i am not getting the results.plz help me write some other code for this.
Prateek gsharma
7-Apr-18 15:30pm
View
didn't get you sir.plz explain how to use that in my code?
Prateek gsharma
5-Apr-18 15:01pm
View
i am not getting results sir.can you plz give me another example with code.if possible?
Prateek gsharma
5-Apr-18 14:59pm
View
i am not getting anything,just blank datagridview.no error also.
can you create one windows form with the same design & clarify the doubt.if possible sir.
Prateek gsharma
5-Apr-18 12:22pm
View
given code also not working sir.
Prateek gsharma
5-Apr-18 0:18am
View
thank you very much sir.i will use yyyymmdd format for datetimepickere
Prateek gsharma
5-Apr-18 0:17am
View
thank you sir.i will try this now
Prateek gsharma
4-Apr-18 15:16pm
View
i didnot get you sir?
Prateek gsharma
9-Jan-18 2:10am
View
ok.i wont ask you any question in future.thank you for your reply
Prateek gsharma
9-Jan-18 1:42am
View
Thank you sir.ok definitely..i will use descriptive names.
Prateek gsharma
6-Jan-18 14:23pm
View
ok sir.i will try this.thank you
Show More