//cmd.Parameters.Clear();
//Set the command text to a SELECT query.
//
cmd.CommandText = "SELECT * FROM TestTbl";
// Create a SqlDataAdapter.
SqlCeDataAdapter myAdapter = new SqlCeDataAdapter();
SqlCeCommand myCommand = new SqlCeCommand("SELECT * FROM TestTbl",conn);
myCommand.CommandType = CommandType.Text;
myAdapter.SelectCommand = myCommand;
DataSet ds = new DataSet("test");
myAdapter.SelectCommand = myCommand;
myAdapter.Fill(ds,"TestTbl");