Re: [sqlite] SQLite utilty to import XML

2009-01-28 Thread Salles, Joaquim Campos
Cool 

Thanks

Joaquim


-Original Message-


I think the firefox SQLite Manager plugin can do XML.
http://code.google.com/p/sqlite-manager/

Alex

___
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


[sqlite] SQLite utilty to import XML

2009-01-27 Thread Salles, Joaquim Campos
Hello,

I'm looking for an SQLite utility (Windows / Linux) to import XML files
into an SQLite Database (free/open source), so I can use it in a shell
script to periodicly search a directory and import the XML files.

I tried to find one in:

http://www.sqlite.org/cvstrac/wiki?p=ManagementTools


But I didn't find anything I can use.

Does anyone have any suggestions?

Thanks for the help,

 

 

Joaquim Salles

___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


[sqlite] database disk image is malformed

2008-01-29 Thread Salles, Joaquim Campos
Hello,

 

Which condition can cause the error: database disk image is malformed.

 

Thanks for the help,

 

Joaquim



[sqlite] SQLite 3.5.4 and libc version less than GLIBC_2.3

2007-12-19 Thread Salles, Joaquim Campos
Is "safe" recompile sqlite3 to use LIBC with version less than 2.3 (like
GLIBC_2.2.4)? 


Thanks for the help,

Best regards,

Joaquim

-
To unsubscribe, send email to [EMAIL PROTECTED]
-



RE: [sqlite] SQL error: database disk image is malformed - SQLITE3.5.1

2007-11-22 Thread Salles, Joaquim Campos


-Original Message-
From: Dennis Cote [mailto:[EMAIL PROTECTED] 
Sent: quinta-feira, 22 de novembro de 2007 12:58
To: sqlite-users@sqlite.org
Subject: Re: [sqlite] SQL error: database disk image is malformed -
SQLITE3.5.1

>
>   
> There is a good description of the things that can cause database 
> corruption at http://www.sqlite.org/cvstrac/wiki?p=DatabaseCorruption 
> which may give you some ideas for things to check.

> Your program can check the database on startup by executing a "pragma 
> integrity_check;" command just like you did from the command line.

> HTH


Dennis Cote

Thanks for the help.

Joaquim

-
To unsubscribe, send email to [EMAIL PROTECTED]
-



[sqlite] SQL error: database disk image is malformed - SQLITE 3.5.1

2007-11-22 Thread Salles, Joaquim Campos
I'm using SQLITE 3.5.1 - in Linux, Had Red 7.1, with a single thread
application - and 2 different programs accessing the same database. I am
getting the following message:
SQL error: database disk image is malformed.

I copy the database to windows and run with sqlite and also get the same
message. Running the following select command I get the same message:

Select * from IDMsg;



SQL error: database disk image is malformed.



Now running the command "PRAGMA integrity_check":

sqlite> PRAGMA integrity_check;
*** in database main ***
Main freelist: 138691677 of 4 pages missing from overflow list starting
at 2972
On tree page 322 cell 0: 3 of 4 pages missing from overflow list
starting at 297
1
Page 2936 is never used
Page 2941 is never used
Page 2963 is never used
Page 2966 is never used
Page 2968 is never used
Page 2970 is never used
sqlite>


Running the VACUUM command the sqlite terminate abnormally (in windows).


Any one has some idea what I have to check in my program to avoid
corruption in database?

What I can do, in my program, in startup, to check if the database is
ok?

Thanks for the help,

Joaquim

-
To unsubscribe, send email to [EMAIL PROTECTED]
-



RE: [sqlite] is safe to use the same database connection at the same time in more than one thread?

2007-11-08 Thread Salles, Joaquim Campos
-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] 
Sent: quinta-feira, 8 de novembro de 2007 12:04
To: sqlite-users@sqlite.org
Subject: Re: [sqlite] is safe to use the same database connection at the
same time in more than one thread?

>Yes.  The wiki page was correct when written but that was
>prior to the release of version 3.5.0.

OK. Maybe some upgrade the wiki release 3.5.*...


>Note that SQLite uses mutexes internally so what will really
>happen is one thread will block while the other is using the
>database connection.  Access to database connections is serialized.
>But the application code does not need to concern itself with
>the serialization any more.  That is now handled automatically
>by SQLite.

Here is an important point: "Access to database connections is
serialized".

Thanks for the help.

Joaquim

-
To unsubscribe, send email to [EMAIL PROTECTED]
-



RE: [sqlite] is safe to use the same database connection at the same time in more than one thread?

2007-11-08 Thread Salles, Joaquim Campos
-Original Message-
>From: Salles, Joaquim Campos [mailto:[EMAIL PROTECTED] 
>Sent: quinta-feira, 8 de novembro de 2007 11:45
>To: sqlite-users@sqlite.org
>Subject: [sqlite] is safe to use the same database connection at the
same >time in more than one thread?

>Is safe to use the same database connection  at the same time in more
>than one thread? 

Hello,

I found two e-mails (bellow) that I think give the answer: yes is safe
to use the same database connection, but is not work in the way that I
imagined. "Transaction control is per connection, not per thread." (Igor
Tandetnik) or "That connection can then be used across threads, but it
is for all intents and purposes a single line of communication with a
database (using it twice at the same time doesn't somehow multiply that
relationship)". (Stephan Beal)


My interpretation is correct? Probably is a good idea to review Multi
Threading page (http://www.sqlite.org/cvstrac/wiki?p=MultiThreading) and
alert about the characteristic :treath safe and Transaction control is
per connection

Best regards,

Joaquim 

Reference:

http://www.mail-archive.com/sqlite-users%40sqlite.org/msg28858.html

You're confusing threads with the context of the connection. When you
call sqlite3_open() you get a single connection to a db. That
connection can then be used across threads, but it is for all intents
and purposes a single line of communication with a database (using it
twice at the same time doesn't somehow multiply that relationship).

stephan beal

http://www.mail-archive.com/sqlite-users%40sqlite.org/msg28868.html

That would happen if thread B had its own, separate connection, but not
when the two threads are working with the same connection. As far as
SQLite is concerned, there's no difference between a single thread
making two changes to the database within a single transaction, or two
threads each making one change. Transaction control is per connection,
not per thread. 

Igor Tandetnik



-
To unsubscribe, send email to [EMAIL PROTECTED]
-



[sqlite] is safe to use the same database connection at the same time in more than one thread?

2007-11-08 Thread Salles, Joaquim Campos
Hello,

Is safe to use the same database connection  at the same time in more
than one thread? The bellow like that is safe: 

http://www.sqlite.org/34to35.html

"Restrictions on the use of the same database connection by multiple
threads have been dropped. It is now safe for multiple threads to use
the same database connection at the same time."

But in following URL say:

http://www.sqlite.org/cvstrac/wiki?p=MultiThreading

"Do not use the same database connection at the same time in more than
one thread."


So, for SQlite 3.5.* is safe to use the same database connection at the
same time in more than one thread?

Thanks for the help,

Best regards,

Joaquim

-
To unsubscribe, send email to [EMAIL PROTECTED]
-



RE: [sqlite] Re: How is the best why to retrieve the key of row just insert?

2007-10-22 Thread Salles, Joaquim Campos
From: Igor Tandetnik [mailto:[EMAIL PROTECTED] 
Sent: segunda-feira, 22 de outubro de 2007 09:59
To: SQLite
Subject: [sqlite] Re: How is the best why to retrieve the key of row
just insert?

Salles, Joaquim Campos
> In my case I have another
> application 
> that is also accessing the database.

Last ROWID is maintained separately for each connection.

Igor Tandetnik


Thanks for help Igor Tandetnik

Best regards,

Joaquim


-
To unsubscribe, send email to [EMAIL PROTECTED]
-



[sqlite] How is the best why to retrieve the key of row just insert?

2007-10-21 Thread Salles, Joaquim Campos

Hello,

How is the best why to retrieve the key of row just inserted? Is secure
to use sqlite3_last_insert_rowid? In my case I have another application
that is also accessing the database. 

Thank you for the help,

Best regards,

Joaquim de Campos Salles


In the documentation(see bellow )


(http://www.sqlite.org/capi3ref.html#sqlite3_last_insert_rowid) 

[" This routine returns the rowid of the most recent INSERT into the
database from the database connection given in the first argument. If no
inserts have ever occurred on this database connection, zero is
returned.

If an INSERT occurs within a trigger, then the rowid of the inserted row
is returned by this routine as long as the trigger is running. But once
the trigger terminates, the value returned by this routine reverts to
the last value inserted before the trigger fired.

If another thread does a new insert on the same database connection
while this routine is running and thus changes the last insert rowid,
then the return value of this routine is undefined."]

I'm using the sqlite3_last_insert_rowid() call to retrieve the key of
the
row I just inserted (so I can refer to it when I do UPDATE and
DELETE)."]


-
To unsubscribe, send email to [EMAIL PROTECTED]
-