15,893,486 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 11057488 (Top 27 by date)
Member 11057488
30-Jun-15 11:38am
View
it works. thank you
Member 11057488
24-Apr-15 6:24am
View
thank you
Member 11057488
24-Apr-15 5:43am
View
same issue actually unable to cast the oject error is thown on this code and in the first code the exception thrown is index out of bound
Member 11057488
24-Apr-15 5:34am
View
private void button1_Click(object sender, EventArgs e)
{
try
{
conn.Open();
cmd = new SqlCommand(@"INSERT INTO [pix].[dbo].[ProductDetails] ([ProductID],[Modelno],[Price],[Quantity]) VALUES ('" + Convert.ToInt32(comboBox1.SelectedItem) + "','" + textBox1.Text + "','" + textBox2.Text + "','" + textBox3.Text + "')", conn);// here i got this error unable to cast object of type system.data.datarowview to typ system.iconvertible
int i = 0;
i = cmd.ExecuteNonQuery();
if (i > 0)
{
MessageBox.Show("Rows inserted successfully");
}
else
{
MessageBox.Show("No rows inserted");
}
}
catch (Exception ex)
{
MessageBox.Show(ex.Message);
conn.Close();
}
finally
{
conn.Close();
Bind();
}
cleardata();
}
Member 11057488
24-Apr-15 3:48am
View
unable to cast object of type system.data.datarowview to typ system.iconvertible in c#.net index out of bound
public void Bind()
{
try
{
string query = @"select ProductMaster.id,ProductMaster.pName,ProductDetails.Modelno,ProductDetails.Price,ProductDetails.Quantity from ProductMaster, ProductDetails";
sda = new SqlDataAdapter(query, conn);
dt = new DataTable();
sda.Fill(dt);
if (dt.Rows.Count > 0)
{
dataGridView1.DataSource = dt;
}
dataGridView1.Columns[0].Visible = false;
}
catch (Exception ex)
{
MessageBox.Show(ex.Message);
}
}
Member 11057488
22-Apr-15 8:20am
View
ya correct.
Can you tell me the steps to create an exe with C# windows application using local database Database1.sdf. I will check it wheater i did it correctly o means i vefied the problm... if it works
Member 11057488
22-Apr-15 8:14am
View
exactly what??? plzz tell me sir
Member 11057488
15-Apr-15 3:03am
View
OleDbConnection connection = new OleDbConnection("Provider=Microsoft.JET.OLEDB.4.0;Data
Source=" + txtFilePath.text.trim() + ";Extended Properties=Excel 8.0");
how to get connection string and how to establish connection...
Member 11057488
7-Apr-15 13:03pm
View
actually i dont know how to explain what actually i m so m suffering from this problem sorry for trouble
Member 11057488
7-Apr-15 3:24am
View
how to find the type of any file that it is a txt file or data file or doc file
Or how to split the extensions means i have a file QDC.SQL i want to split this means i want QDC seperate and SQL Seperate how to do this can any1 tell me plzz
Member 11057488
7-Apr-15 3:04am
View
its helpful sir bt it gives me the string Try Try But Don't Cry after using replace code it replace the Cry word by blank and give me output as Try Try But Don't CryTry Try Don't Cry.
But i want that the total string was replaced by new string which does not contained Cry how to do this i dont knw
Member 11057488
7-Apr-15 2:54am
View
i want to show that the file is currupt means it has virus infected then i run antivirus program that scan that file then after scanning it delete the single word or string from that means means the virus is clean
Member 11057488
6-Apr-15 13:38pm
View
thank you sir its helpful for me thank you again
Member 11057488
6-Apr-15 12:47pm
View
Content of the file
Member 11057488
6-Apr-15 12:46pm
View
I use this code
Directory.CreateDirectory("D:\\ABC");
Directory.CreateDirectory("c:\\avi");
FileStream fs = new FileStream("c:\\avi\\a1.bat", FileMode.OpenOrCreate, FileAccess.ReadWrite);
StreamWriter sw = new StreamWriter(fs);
sw.Write ("Try Try But Don't Cry");
sw.Close();
fs.Close();
By using following code i m able to add string in the above file but i dont konw how to detect files for "But" word means which files contains this text.And delete that Word from file but dont know how
Member 11057488
6-Apr-15 12:41pm
View
I want to create an application on which first i have add one string like "Try Try But Don't Cry" i want to add this string to some files on my computer and then I want to check the files that contained the specific string or word which i mention then i want to delete "But" word from that string.
Member 11057488
6-Apr-15 12:37pm
View
i want to insert one string on ny file which is on my desktop.
then i have to detect all files that any specific word should be on that file text then delete that specific word from the string which is on that file
Member 11057488
6-Apr-15 3:44am
View
actually we know hoe to create a virus but we are not sure that which virus has been created by us so how to detect that virus and how to clean it.we dont know how to do this
Member 11057488
6-Apr-15 3:42am
View
i just want help to create fake virus and how to detect that and clean that not actual virus just fake virus will nybody help me
Member 11057488
6-Apr-15 3:16am
View
i know but i got this task from my college
Member 11057488
4-Apr-15 4:45am
View
sorry sir actually there is little bit confusion.
thanks for rply
Member 11057488
4-Apr-15 4:39am
View
i want to retrive the data of march month of last year without specifying the range and without using where clause so now how to fire the query for that???plzz help sir
Member 11057488
4-Apr-15 4:33am
View
thank you sir
bt this gives me date field with time also i want that when i fire the query only data with dates will be retive not time so how to solve this problem is there any provision to split date and time seperately
Member 11057488
25-Mar-15 5:58am
View
Thank you sir.. This is helpful for me.
Member 11057488
13-Mar-15 6:23am
View
But I want to display all records on single label one by one after clicking the button means when the form is loaded the first record is shown on label bt when i click on button i want that another record display on the label the records displayed randomly one after another
Member 11057488
13-Mar-15 6:20am
View
no I don't want to conacatenate the records i want to display all the records one after another
Member 11057488
13-Mar-15 5:21am
View
I use this code and it works properly but its just for single record bt i have multiple records in my column so i dont know how to do it for multiple recordds
SqlConnection con = new SqlConnection("Data Source=USER;Initial Catalog=emp;Integrated Security=True");
SqlCommand cmd;
con.Open();
string str = "select emp_name from Emp_table";
cmd = new SqlCommand(str, con);
SqlDataReader reader = cmd.ExecuteReader();
reader.Read();
label1.Text = reader["emp_name"].ToString();
radioButton1.Text = reader["emp_name"].ToString();
radioButton1.Visible = true;
con.Close();
Show More