A
Annie
hello guys,
I have little experience working with C# and MS Access ...
I am having an insert query with one datetime field and a boolean and couple
of text and number fields as below:
"Insert into order (OrderClientID, OrderDate, OrderOfferID, OrderIsSpecial,
OrderShipment) Values (6, # 16/09/2005 2:38:51 PM # , 1 , 0 , 'hello there
it is test')"
The second parametter is Date format, and the 4th one is boolean. I tryed
false and 0 but both didn't work.
I create my string as below:
string strTable="Insert into order";
string strFields=" (OrderClientID, OrderDate, OrderOfferID, OrderIsSpecial,
OrderShipment)";
string strValues= " Values (" + personID +
", # " + System.DateTime.Now.ToString() +
" #, " + 1 +
", " + 0 +
" ,'" + shipment + "')";
string insertStr = strTable + strFields + strValues;
it raises SQL insert error while try to add.
what is going wrong here?
I have little experience working with C# and MS Access ...
I am having an insert query with one datetime field and a boolean and couple
of text and number fields as below:
"Insert into order (OrderClientID, OrderDate, OrderOfferID, OrderIsSpecial,
OrderShipment) Values (6, # 16/09/2005 2:38:51 PM # , 1 , 0 , 'hello there
it is test')"
The second parametter is Date format, and the 4th one is boolean. I tryed
false and 0 but both didn't work.
I create my string as below:
string strTable="Insert into order";
string strFields=" (OrderClientID, OrderDate, OrderOfferID, OrderIsSpecial,
OrderShipment)";
string strValues= " Values (" + personID +
", # " + System.DateTime.Now.ToString() +
" #, " + 1 +
", " + 0 +
" ,'" + shipment + "')";
string insertStr = strTable + strFields + strValues;
it raises SQL insert error while try to add.
what is going wrong here?