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
Mehboob Ali
NA
25
3k
insert a converted date into database
Feb 27 2016 10:19 PM
My System date format is customized as dd/MM/yyyy
when i enter date e.g 25/02/2016 than in textbox c# windows form, it gives error System.Data.SqlClient.SqlException
My Code is given below
private void button1_Click(object sender, EventArgs e)
{
SqlConnection con = new SqlConnection("Data Source=.;Initial Catalog=Test;User ID=abc; Password=****");
SqlDataAdapter sda = new SqlDataAdapter("insert into dates values('"+textBox1.Text.ToString()+"')",con);
DataTable dt = new DataTable();
sda.Fill(dt);
MessageBox.Show("Data Inserted");
Reply
Answers (
11
)
Show select ed value in drop down list
Shuffle / random a list of objects and get the same result