Tank you very much for the response. the array is as expected, sprintf is woking fine. Also I get the same error if I write the SQL command directly in the sqlite3_exec() function, so this is not the error...
Thank you again for the interest, Regards alberto ----- Mensaje original ---- De: Igor Tandetnik <[EMAIL PROTECTED]> Para: sqlite-users@sqlite.org Enviado: miƩrcoles, 15 de octubre, 2008 17:31:59 Asunto: Re: [sqlite] Error:"Expression cannot be evaluated" with sqlite3_exec() Alberto Tellaeche <[EMAIL PROTECTED]> wrote: > work perfectly well, but I am having a very annoying problem with > sqlite3_exec() function. The code just after the example above is: > > memset(orden_SQL,0,200*sizeof(char)); > sprintf(orden_SQL,"update ALUMNO set nota=%0.1f where > dni='%s';",nota,dni); > res=sqlite3_exec(db,orden_SQL,0,0,&errorMsg); > sqlite3_free(errorMsg); Examine orden_SQL after sprintf, check that it's as expected. For example, sprintf is locale sensitive: if your locale, say, uses comma for decimal separator rather than a period, the query would end up with something like "set nota=1,1". But SQLite expects to see a period for decimal separator. Igor Tandetnik _______________________________________________ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users _______________________________________________ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users