I have a
SqlCeException was caught There was an error parsing the query.
[Token line number = 1,Token line offset = 80,Token in error = order by]
SqlCeCommand com = new SqlCeCommand("(Select LineID, OrderID, ItemName, Code from [tblOrderLine] where Code=@code [order by] tblOrderLine.LineID desc)", con);
com.Parameters.Add("@code", SqlDbType.NVarChar).Value = code;
You should not use the Square brackets for keywords other than database objects.
 for the keyword order by.
SqlCeCommand com = new SqlCeCommand(@"Select LineID, OrderID, ItemName, Code from [tblOrderLine] where Code=@code order by tblOrderLine.LineID desc", con);