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
Dinesh Santhalingam
NA
737
370.5k
How to insert the data to sql table?
Jan 23 2017 12:32 AM
I have some values .I want to insert the values into the Sql table .Here is my code.There were no error populating.But i can't able to insert the data to sql table.
using (SqlConnection
Connection
=
new
SqlConnection((@"Data Source")))
{
using (SqlCommand
myCommand
=
new
SqlCommand("INSERT INTO table1(Nameofbike,Totalbike,
Inuse)", Connection))
{
Connection.Open();
myCommand.Parameters.Add(new SqlParameter("Nameofbike", "Hero"));
myCommand.Parameters.Add(new SqlParameter("Totalbike", "15"))
myCommand.Parameters.Add(new SqlParameter("Inuse", "10"));
}
Connection.Close();
}
Reply
Answers (
4
)
HOW TO MAKE EACH TEXTBOX PERFORM SUMMATION
How to add Item to a list in c#?