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
sathish kumar
NA
117
165.2k
sql2008 error
May 19 2012 12:59 AM
i am inserting like below ::::::: my datatype of ExpiryDate is date in sql2008
DateTime ExDate = DateTime.Parse(txtExpiryDate.Text);
strSQL = " INSERT INTO [OpeningBalance] ([Location],[ItemCode],[BatchNo],[ExpiryDate],[Qty],[UOM],[Rate],[Value])VALUES ('" + ddlLocation.SelectedItem.ToString() + "','" + txtItemCode.Text + "','" + txtBatchNo.Text + "','" + ExDate + "', '" + txtQty.Text + "','" + ddlUom.SelectedItem.ToString() + "','" + txtRate.Text + "','" + txtValue.Text + "')";
but
while updating it shows invalid date error
Below is mu updating query:
strSQL = "Update [OpeningBalance] Set BatchNo='" + txtBatchNo.Text + "',Qty='" + txtQty.Text + "',UOM='" + ddlUom.SelectedItem.ToString() + "',Rate='" + txtRate.Text + "',Value='" + txtValue.Text + "',ExpiryDate='" + ExDate + "' Where ItemCode ='" + txtItemCode.Text + "'";
any1 help me please....its urgent....Thanks in advance....
Reply
Answers (
1
)
reply fast as possible?
date fromat error in sql 2008