The scenario:
Application developed with Visual Studio 2005, C#, .NET CF 2.0, SQLite, Windows CE 5.
The problem.
The user search for a register in database, runs OK, the user change a information in the register and save it.
The user make a new search for that register, and the new information is ok.
The user exits the application, and return to application again, and consult that register, and the changes are not in register, he lost their changes.
The code:
a class that manage the connection:
{
class Conexao
{
private static SQLiteConnection con = new SQLiteConnection("data source=\\Storace Card\\ESACSWinCE.db;New=False");
private Conexao(){}
public static SQLiteConnection getConexao()
{
return con;
}
}
}
the only place where have a Update statement in the code:
public string SaveIt(bool NewItem)
{
string strSQL = "";
string result_str = "";
bool error_save = false;
SQLiteCommand cmd = (Conexao.getConexao()).CreateCommand();
strSQL = "UPDATE ITENS SET .... "; // The SQL statement for make update.
}
if (!error_save)
{
cmd.CommandText = strSQL;
try
{
cmd.ExecuteNonQuery();
}
catch (Exception E)
{
result_str = "(" + E.ToString() + ")" + E.Message;
}
The application allways save the journal file, I can see it on HandHeld, but the changes are not update in the real database.
I try using transactions too, but nothing, continues with the same error.
Anyone can help me???