15,896,557 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 faizy001 (Top 12 by date)
faizy001
2-Mar-23 2:09am
View
sir i have seen this example but this time i want to Bind a List or collection
faizy001
22-May-17 2:14am
View
thank you :)
faizy001
2-May-17 7:34am
View
sir this is very important for me please solve the problem
faizy001
2-May-17 7:33am
View
hello sir . i applied this codes like that but it is not working . please check where . am wrong
SqlConnection con = new SqlConnection("Data Source=.;Initial Catalog=DelhiEMP;Integrated Security=True");
con.Open();
string query1 = "insert into countermaster2(code, name, type) values(@code, @name, @type)";
SqlCommand cmd = new SqlCommand(query1,con);
SqlDataAdapter da = new SqlDataAdapter(cmd);
DataSet ds = new DataSet();
cmd.Parameters.AddWithValue("@code", comboBox2.SelectedItem);
cmd.Parameters.AddWithValue("@name", textBox2.Text);
cmd.Parameters.AddWithValue("@type", comboBox1.SelectedItem);
if (ds.Tables["countermaster2"].Rows.Count>0)
{
MessageBox.Show("Code is already exsist");
}
else
{
MessageBox.Show("enter new records");
}
cmd.ExecuteNonQuery();
MessageBox.Show("Saved");
faizy001
2-May-17 2:40am
View
sir i want to my code should be run properly. i have tried many times but still not working. please do my code in correct format .
faizy001
1-May-17 12:54pm
View
this query is working properly. what is wrong in my codes. sir
faizy001
1-May-17 6:56am
View
YES I DID BUT
string query = "insert into Employee(ID,Name, Age, Department, Salary, DateOFBirth) values(@ID,@Name, @Age, @Department, @Salary, @DateOFBirth)";
cmd = new SqlCommand(query,con);
if (cmd.CommandText==null)
{
cmd.Parameters.AddWithValue("@ID",Convert.ToInt32(DBNull.Value));
cmd.Parameters.AddWithValue("@Name",DBNull.Value);
cmd.Parameters.AddWithValue("@Age",DBNull.Value);
cmd.Parameters.AddWithValue("@Department",DBNull.Value);
cmd.Parameters.AddWithValue("@Salary",DBNull.Value);
cmd.Parameters.AddWithValue("@DateOFBirth",DBNull.Value);
}
else
{
cmd.Parameters.AddWithValue("@ID", textBox1.Text);
cmd.Parameters.AddWithValue("@Name", textBox2.Text);
cmd.Parameters.AddWithValue("@Age", textBox3.Text);
cmd.Parameters.AddWithValue("@Department", textBox4.Text);
cmd.Parameters.AddWithValue("@Salary", textBox5.Text);
cmd.Parameters.AddWithValue("@DateOFBirth", textBox6.Text);
}
cmd.ExecuteNonQuery();
con.Close();
BUT PROBLEM ARE STRILL SAME
faizy001
1-May-17 2:06am
View
i am sending my table structure. please check
faizy001
1-May-17 1:59am
View
CREATE TABLE [dbo].[itemmaster](
[itemcode] [int] NOT NULL,
[name] [varchar](50) NULL,
[salesprice] [decimal](18, 0) NULL,
[salestax] [decimal](18, 0) NULL,
[profit] [decimal](18, 0) NULL,
[quantityonhand] [decimal](18, 0) NULL,
PRIMARY KEY CLUSTERED
(
[itemcode] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
) ON [PRIMARY]
faizy001
13-Apr-17 3:40am
View
kumar-G main ye chahta hu ki jab main form2 main partymaster2 ki ID insert karu tab automatically countermaster2 se code value textbox main display ho jaye. or jaise jaise main partymaster2 ki ID insert karu tab code value bhi change ho jaye
faizy001
13-Apr-17 3:16am
View
i want if i enter table2 ID in textbox then code value which is table1 correspondence value should be display
faizy001
10-Apr-17 6:02am
View
i want code and name values should be display automatically on window form3
Show More