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
darma teja
NA
496
338.6k
Problem in exporting masked text box date to databse columns
May 22 2012 6:49 AM
Hi,
I am loading the user entered data from the form to sql database.
Here is my code:
SqlConnection con = new SqlConnection("bla bla");
con.Open();
string insertsql = "insert into John (date1, date2, date3)" + "values ('" " "', '" + maskedTextBox1.Text + "', '" + maskedTextBox2.Text + "', '" + maskedTextBox3.Text +"');";
SqlCommand insertcmd = new SqlCommand(insertsql, con);
insertcmd.ExecuteNonQuery();
con.close();
All masked textboxes are in date format only.
My question is:
If i dont enter the date on the form in masked textboxes, i am getting error.
How can i enter null values in database.
Darma
Reply
Answers (
5
)
Language translation in windows application with using net and resex files
Adding double \ to file name from a text box....