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
rimmi anand
NA
6
4.6k
System error(missing operator) in query expression '19-06-2012'
Jun 20 2012 1:41 PM
public void purchaseProduct(string productname, string challan_no, DateTime challan_date, string bill_no, DateTime bill_date, string Customer,string InvoiceNo)
{
con.Open();
OleDbCommand insert = new OleDbCommand("INSERT INTO [PRODUCT_DETAILS]([PRODUCT_NAME],[CHALLAN_NO],[CHALLAN_DATE],[BILL_NO],[BILL_DATE],[CUST_NAME],[INVOICE_NO])VALUES('"+productname+"','"+challan_no+"',"+challan_date+",'"+bill_no+"',"+ bill_date +",'"+Customer+"','"+InvoiceNo+"')", con);
insert.ExecuteNonQuery();
MessageBox.Show("Your data has been saved.");
}
How to save date in access database from datetime picker in c#. I have passed values in the following manner:
add.purchaseProduct(txtproductname.Text.ToUpper(), txtchallan_no.Text.ToUpper(), txtchallan_date.Value, txtbill_no.Text.ToUpper(), txtbill_date.Value, txtCustomer.Text.ToUpper(), invoiceNo);
I have tried hash in front of date but i ddidnt succed. How to save date in access date/Time datatype format in access.
Reply
Answers (
4
)
Getting IErrorInfo.GetDescription failed with E_FAIL(0x80004005). public string generateInvoi...
Draw button in visual studio 2010 professional