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
Marvin kakuru
1.4k
359
160.8k
Inserting Date Value
Jul 17 2011 4:48 AM
Hi all i am trying to insert a string of data into an sql database table from a number of textboxes, however the date value 17/07/2011 in my textbox4 is not being inserted and haulting the whole processes.
Below is the code i am using
string
insertString =
"insert into Herdregistar(month,uic,motheruic,mother,name,animalsex,tagno,status,owner,presence,year,wkno,day,date) values ('"
+ textBox6.Text +
"','"
+ textBox11.Text +
"','"
+ textBox8.Text +
"','"
+ textBox9.Text +
"','"
+ textBox12.Text +
"','"
+ comboBox3.Text +
"','"
+ textBox13.Text +
"','"
+ comboBox1.Text +
"','"
+ textBox15.Text +
"','"
+ comboBox4.Text +
"','"
+ textBox7.Text +
"','"
+ textBox5.Text +
"','"
+ textBox3.Text +
"','"
+ textBox4.Text +
"')"
SqlCommand
cmd.ExecuteNonQuery();
cmd =
new
SqlCommand
(insertString, conn);
in my sql database i have set the value of the date column as "Date"
your kind advice will be highly appreciated.
Best regards
Reply
Answers (
7
)
New Bitmap: ArgumentException was unhandled Parameter is not valid
Problem with classes and interface