now my code is:
class OrderMapper:Imapper
{
static public SqlCeConnection Qconnection = new SqlCeConnection();
static public SqlCeCommand Qcommand = new SqlCeCommand ();
public void put(object ob)
{
string str = "Data Source=|DataDirectory|\\Database1.sdf;Persist Security Info=False;";
Qconnection.ConnectionString = str;
Qcommand.Connection = Qconnection;
Qconnection.Open();
for (int i = 0; i < orderColection.counter1; i++)
{
string commandText = "select * from order";
Qcommand.CommandText = commandText;
Qcommand.CommandType = CommandType.Text;
Qcommand.ExecuteNonQuery();
}
Qconnection.Close();
}
}
and my error is:
An unhandled exception of type 'System.Data.SqlServerCe.SqlCeException' occurred in System.Data.SqlServerCe.dll
Additional information: There was an error parsing the query. [ Token line number = 1,Token line offset = 15,Token in error = order ]