15,910,877 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 Member 10358986 (Top 17 by date)
Member 10358986
17-Jan-14 4:56am
View
Thank you sir
Yes sir i am storing date in a fixed format like this
07-01-2017,07-01-2017,07-01-2017,07-01-2017,07-01-2017,07-01-2017,07-01-2017..
just want to restrict duplicates.
Sir i am a beginner.
So please provide me the code.Please...
Thank you very much
Member 10358986
17-Jan-14 4:16am
View
Thank you sir
Sir i am updating renewal_dates field.Every time update is executed new values are added (concatenated)to the same field in database, as records.
Generally a licence is renewed 10 to 15 times.
So instead of making separate fields for every renewal date i am concatenating dates as string to save in one column.
Now i want to check this string for a date before updating it.
Member 10358986
4-Jan-14 0:36am
View
Thank you very much
there was a small mistake in my syntax...
it should be combobxthana.Text instead of comboboxthana.SelectedText
Member 10358986
18-Dec-13 6:30am
View
Its working.
Thank you very much.
Member 10358986
10-Dec-13 1:08am
View
thank you sir
this code is also showing error
newline in constant.
Member 10358986
9-Dec-13 5:19am
View
yes sir
when my page load there is data on the form now when i want to filter according to my query on button click it shows an error. that is
'A number currency boolean.............is expected here'
Member 10358986
9-Dec-13 4:05am
View
Sir i want to make crystal reports after search query something like below.
CrystalReport1 myReport;
string connstring = @"Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\Documents and Settings\nic-15\My Documents\ALRS.mdb";
string query = "select thana,sanction_date,renewal_date,licencee_name,father_name from arms_records where thana='" + comboBoxThana.SelectedItem + "'";
OleDbConnection con = new OleDbConnection(connstring);
OleDbDataAdapter da = new OleDbDataAdapter(query, con);
DataSet ds = new DataSet();
da.Fill(ds, "Test");
myReport = new CrystalReport1();
myReport.SetDataSource(ds);
crystalReportViewer1.SelectionFormula = "{arms_records.thana}=" + comboBoxThana.SelectedItem;
crystalReportViewer1.ReportSource = myReport;
ds.Dispose();
con.Close();
But this code doesn't work.
Member 10358986
9-Dec-13 2:46am
View
Sir I couldn't solve my problem plz help.
Member 10358986
28-Nov-13 1:29am
View
Hello sir I have a same problem. I am using the above codes. but in both the above codes an error is there that is
"The given path's format is not supported."
Member 10358986
14-Nov-13 0:19am
View
Thank you sir
I have solved the problem.My controls were in a table.so i used nested foreach and it is working.
Member 10358986
13-Nov-13 5:06am
View
Thank you Sir
but i am unable to solve my problem my code is :
private void buttonSave_Click(object sender, EventArgs e)
{
// examine the contents of the errorProvider for each control
bool success = true;
foreach (Control c in this.Controls)
{
if (errorProvider1.GetError(c).Length > 0)
success = false;
}
if (success)
{
// MessageBox.Show("All fields filled");
try
{
string connectionString = (@"Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\Documents and Settings\nic-15\My Documents\ALRS.mdb");
OleDbConnection con = new OleDbConnection(connectionString);
con.Open();
string query = "insert into arms_records (thana,licence_number,sanction_date,licencee_name,father_name,dob,religion,caste,address,village,uid,mobile,email,arms_category,type_of_arm,no_of_arms,arms_number,valid_area,renewal_date,remark,[image],[arms_image]) values (@thana, @lno, @sdate, @lname, @fname, @dob, @religion, @caste, @address, @village, @uid, @mobile, @email, @armscat, @toarm, @narms, @ano, @varea, @rdate, @remark, @image, @armsImage)";
OleDbCommand cmd = new OleDbCommand(query, con);
cmd.Parameters.AddWithValue("@thana", comboBoxthana.SelectedItem);
cmd.Parameters.AddWithValue("@lno", textBoxLicence_number.Text);
cmd.Parameters.AddWithValue("@sdate", dateTimePicker1.Text);
cmd.Parameters.AddWithValue("@lname", textBoxLicencee_Name.Text);
cmd.Parameters.AddWithValue("@fname", textBoxFatherName.Text);
cmd.Parameters.AddWithValue("@dob", dateTimePickerDob.Text);
cmd.Parameters.AddWithValue("@religion", comboBoxReligion.SelectedItem);
cmd.Parameters.AddWithValue("@caste", comboBoxCaste.SelectedItem);
cmd.Parameters.AddWithValue("@address", textBoxAdress.Text);
cmd.Parameters.AddWithValue("@village", textBoxvillage.Text);
cmd.Parameters.AddWithValue("@uid", textBoxUid.Text);
cmd.Parameters.AddWithValue("@mobile", textBox1Mobile.Text);
cmd.Parameters.AddWithValue("@email", textBoxemail.Text);
cmd.Parameters.AddWithValue("@armscat", comboBoxArmsCategory.SelectedItem);
cmd.Parameters.AddWithValue("@toarm", comboBoxtypeofarm.SelectedItem);
cmd.Parameters.AddWithValue("@narms", textBoxNoOfArm.Text);
cmd.Parameters.AddWithValue("@ano", textBoxArmsNo.Text);
cmd.Parameters.AddWithValue("@varea", comboBoxValidArea.SelectedItem);
cmd.Parameters.AddWithValue("@rdate", dateTimePickerRenewDate.Text);
cmd.Parameters.AddWithValue("@remark", textBoxRemark.Text);
// below 10 lines convert image into binary data
byte[] FileByte = null;
//string filename = textBoxImage.Text.Substring(textBoxImage.Text.LastIndexOf("\\") + 1, textBoxImage.Text.Length - (textBoxImage.Text.LastIndexOf("\\") + 1));
string path = textBoxImage.Text;
FileStream fs = new FileStream(path, System.IO.FileMode.Open, System.IO.FileAccess.Read);
BinaryReader br = new BinaryReader(fs);
long allbytes = new FileInfo(path).Length;
FileByte = br.ReadBytes((Int32)allbytes);
fs.Close();
fs.Dispose();
br.Close();
//below code convert ArmsImage into binary data
byte[] FileByte2 = null;
string path2 = textBoxArmsImage.Text;
FileStream fs2 = new FileStream(path
Member 10358986
31-Oct-13 1:59am
View
"2012-01-01 00:00:00" and "25-Sep-13" for this date my code is working.
"12/28/1951 " for this format its showing the above error.
please solve this.
thank you.
Member 10358986
30-Oct-13 6:45am
View
thank you sir
Member 10358986
28-Oct-13 8:08am
View
Hello Sir
what should be the UPDATE query for the above parameters.
Member 10358986
28-Oct-13 4:59am
View
yes sir i am using C# and making a window application using access database
Member 10358986
26-Oct-13 5:47am
View
Its working Sir.
thank you very much
Member 10358986
26-Oct-13 4:12am
View
Thank you sir
i have removed first "Value" from sql command but now another is there and that is
"Syntax error in INSERT INTO statement."
Show More