On Thu, 2007-04-19 at 13:29 -0500, David A O L wrote:
> I have a very basic sql statement, mainly Im printing it...
>
> static int GuardaActividadEnArchivo(void *arg1, int argc, char **argv, char
> **azColName){
> int i;
> char *nombre, *ok, *ko, *actividad;
> nombre = ok = ko = actividad = 0;
> for (i = 0; i < argc; i++) {
> printf("%s = %s ", azColName[i], argv[i] ? argv[i] : "NULL");
> }
> printf("\n");
> // Here!
> return 0;
> }
>
>
> What I whant is that in // Here! I whant to update (increment, decrement,
> etc).
>
> But it say that the DB is locked...
With sqlite v2, yes. If you were using sqlite v3 you could do the
UPDATE in the SELECT callback.
> What I see is that I can use arg1 like a pointer to a linked list to hold
> data and then do the update...
True. That's the way to go with v2 I think.
> The question is: the anterior way is the only way???
I think anterior means "before"... I'm no wordsmith...
Dan.
-----------------------------------------------------------------------------
To unsubscribe, send email to [EMAIL PROTECTED]
-----------------------------------------------------------------------------