Re: [sqlite] SQLite and Qt

2010-06-14 Thread Sam Carleton
Sylvain, I have given it a try and it isn't working. First a quick questions: Is qsqlite.dll statically linked to the sqlite code or dynamically linked? The sqlite3.lib I am trying to link to is the for dynamically linking, aka requiring the sqlite3.dll. I am guessing that is the issue, but

Re: [sqlite] no such table error.

2010-06-14 Thread Tom Lynn
Yes, that's it! Thanks. On Mon, Jun 14, 2010 at 3:56 PM, P Kishor wrote: > On Mon, Jun 14, 2010 at 5:53 PM, Tom Lynn wrote: > > I'm fairly new to sqlite and generally use databases with single tables > for > > use with my PERL scripts. I've encountered

Re: [sqlite] no such table error.

2010-06-14 Thread P Kishor
On Mon, Jun 14, 2010 at 5:53 PM, Tom Lynn wrote: > I'm fairly new to sqlite and generally use databases with single tables for > use with my PERL scripts.  I've encountered a problem where I've tried to > insert data into a table named trunks and get the error "No such table: >

[sqlite] no such table error.

2010-06-14 Thread Tom Lynn
I'm fairly new to sqlite and generally use databases with single tables for use with my PERL scripts. I've encountered a problem where I've tried to insert data into a table named trunks and get the error "No such table: main.atd_data" atd_data is a table that I use in a different script. The

[sqlite] is there a way to extend the field information ?

2010-06-14 Thread Stef Mientki
hello, I want to extend the field information of a field in a table, e.g. I want to add a "description" to each field. The only way that came up in my head was the following: - create a "special" table, containing the additional field information: create table _Field_Ex ( Tabel Text

Re: [sqlite] Parametrized Queries issue (Possible bug)

2010-06-14 Thread Israel Lins Albuquerque
I done a path to make this works, if someone wants! Now... CREATE TABLE a (a, b); INSERT INTO a VALUES (0, 0); INSERT INTO a VALUES (0, 1); INSERT INTO a VALUES (1, 0); INSERT INTO a VALUES (1, 1); SELECT * FROM a WHERE a.a = :a AND a.b = ?1; SELECT * FROM a WHERE a.a = ?1 AND a.b = :b;

Re: [sqlite] Parametrized Queries issue (Possible bug)

2010-06-14 Thread Israel Lins Albuquerque
I read that but that say "To avoid confusion, it is best to avoid mixing...", but you need never mix them, if you want have none collateral effects !!! - Mensagem original - De: "Jay A. Kreibich" Para: "General Discussion of SQLite Database"

Re: [sqlite] Parametrized Queries issue (Possible bug)

2010-06-14 Thread Jay A. Kreibich
On Mon, Jun 14, 2010 at 03:03:52PM -0300, Israel Lins Albuquerque scratched on the wall: > I know what you booth are are saying. But if this is a limitation of sqlite, > this need be documented, and doesn't have any comment of this behavior. http://sqlite.org/lang_expr.html#varparam

Re: [sqlite] Parametrized Queries issue (Possible bug)

2010-06-14 Thread Israel Lins Albuquerque
I know what you booth are are saying. But if this is a limitation of sqlite, this need be documented, and doesn't have any comment of this behavior. And the name of parameter ':a' are changed, we can't set his value, only using the index or your new name '?1' !!! - Mensagem original -

Re: [sqlite] SQLite lets selecting a column that is not inthe Group by clause

2010-06-14 Thread Alexey Pechnikov
And this is needed as replacement of the "distinct on" clause. I don't know other way to translate many queries from PostgreSQL to SQLite. 2010/6/11 Igor Tandetnik : > SQLite allows "naked" non-grouped columns as an extension (which is > occasionally useful). -- Best

Re: [sqlite] Parametrized Queries issue (Possible bug)

2010-06-14 Thread David Bicking
I think in your first example, the :a comes first, so it is assigned the first index value. You then use ?1, which also uses the first parameter index. In the second, you use ?1 first, then :b, which sees the first index has been used and thus assigns it to the second index. As I believe Jay

Re: [sqlite] output problem

2010-06-14 Thread Simon Slavin
On 14 Jun 2010, at 1:53pm, Mark wrote: > thanks, yeah sorry, what I meant to ask was, because the .read command is > going away to read another file, > away from this one, if you know what I mean, does it > actually know to wait for that to finish, or once it's started > executing the .read,

Re: [sqlite] Mail loop?

2010-06-14 Thread Richard Hipp
On Mon, Jun 14, 2010 at 10:40 AM, Simon Slavin wrote: > > On 14 Jun 2010, at 3:06pm, Black, Michael (IS) wrote: > > > And if Peter isn't the problem you can do a binary search. > > It is Peter. I have the same entry in the headers on the bounce messages I > receive:

[sqlite] output problem

2010-06-14 Thread Mark
thanks, yeah sorry, what I meant to ask was, because the .read command is going away to read another file, away from this one, if you know what I mean, does it actually know to wait for that to finish, or once it's started executing the .read, does it immediately move on to the dump?

Re: [sqlite] Parametrized Queries issue (Possible bug)

2010-06-14 Thread Jay A. Kreibich
On Mon, Jun 14, 2010 at 12:07:08PM -0300, Israel Lins Albuquerque scratched on the wall: > Yes. I know that, but the names of parameters are different, > and I debug this and the parameter named as ':a' will be overwrited by '?1', > and if I use sqlite3_bind_parameter_index(stmt, ":a") will

Re: [sqlite] Avoiding Database Is Locked Error

2010-06-14 Thread Pavel Ivanov
>> Do you mean you're making changes as you call SQLite to _step() through the >> results of the SELECT ?  Or do you read all the results of the SELECT into >> memory, then make changes to the database ? > > The former. Oh, I completely forgot that people can do that. So, Robert, you case is

Re: [sqlite] Parametrized Queries issue (Possible bug)

2010-06-14 Thread Israel Lins Albuquerque
Yes. I know that, but the names of parameters are different, and I debug this and the parameter named as ':a' will be overwrited by '?1', and if I use sqlite3_bind_parameter_index(stmt, ":a") will fail, returning 0. But actually they are not the same. - Mensagem original - De: "Jay

Re: [sqlite] Parametrized Queries issue (Possible bug)

2010-06-14 Thread Jay A. Kreibich
On Mon, Jun 14, 2010 at 11:51:07AM -0300, Israel Lins Albuquerque scratched on the wall: > Using the example above I see one not documented issue. When I use parameters > ?NNN and : or @ or $ , > in same query as above some of then will be omitted. I don't know if this is > the

Re: [sqlite] Avoiding Database Is Locked Error

2010-06-14 Thread Simon Slavin
On 14 Jun 2010, at 3:43pm, Robert Latest wrote: > On Mon, Jun 14, 2010 at 4:36 PM, Simon Slavin wrote: > >> Do you mean you're making changes as you call SQLite to _step() through the >> results of the SELECT ? Or do you read all the results of the SELECT into >> memory,

Re: [sqlite] Parametrized Queries issue (Possible bug)

2010-06-14 Thread Israel Lins Albuquerque
Once more detail... Doing this... SELECT * FROM a WHERE a.a = :a AND a.b = ?1; and this... SELECT * FROM a WHERE a.a = ?1 AND a.b = :b; Will have different behavior! - Mensagem original - De: "Israel Lins Albuquerque" Para:

[sqlite] Parametrized Queries issue (Possible bug)

2010-06-14 Thread Israel Lins Albuquerque
Using the example above I see one not documented issue. When I use parameters ?NNN and : or @ or $ , in same query as above some of then will be omitted. I don't know if this is the expected behavior or not. CREATE TABLE a (a, b); CREATE TABLE b (a, b); INSERT INTO a VALUES (0,

Re: [sqlite] Avoiding Database Is Locked Error

2010-06-14 Thread Jay A. Kreibich
On Mon, Jun 14, 2010 at 09:42:09AM -0400, Pavel Ivanov scratched on the wall: > > This is interesting. I often have situations where I SELECT something > > and then do manipulations (INSERT/DELETE/UPDATE) on the db as I > > iterate through the results. > > > > Is this what you mean by your

Re: [sqlite] Avoiding Database Is Locked Error

2010-06-14 Thread Robert Latest
On Mon, Jun 14, 2010 at 4:36 PM, Simon Slavin wrote: > Do you mean you're making changes as you call SQLite to _step() through the > results of the SELECT ?  Or do you read all the results of the SELECT into > memory, then make changes to the database ? The former. robert

Re: [sqlite] Mail loop?

2010-06-14 Thread Simon Slavin
On 14 Jun 2010, at 3:06pm, Black, Michael (IS) wrote: > And if Peter isn't the problem you can do a binary search. It is Peter. I have the same entry in the headers on the bounce messages I receive: peter.spi...@[omitted for privacy]. Simon. ___

Re: [sqlite] Avoiding Database Is Locked Error

2010-06-14 Thread Simon Slavin
On 14 Jun 2010, at 1:44pm, Robert Latest wrote: > This is interesting. I often have situations where I SELECT something > and then do manipulations (INSERT/DELETE/UPDATE) on the db as I > iterate through the results. Do you mean you're making changes as you call SQLite to _step() through the

Re: [sqlite] Avoiding Database Is Locked Error

2010-06-14 Thread Robert Latest
Thanks, your and Pavel's clarifications have been very helpful. robert ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Re: [sqlite] Avoiding Database Is Locked Error

2010-06-14 Thread Jay A. Kreibich
On Mon, Jun 14, 2010 at 02:44:02PM +0200, Robert Latest scratched on the wall: > On Fri, Jun 11, 2010 at 5:26 PM, Pavel Ivanov wrote: > > > 1. Ensure that you have no transactions started with SELECT and > > continued with INSERT/DELETE/UPDATE > > This is interesting. I

Re: [sqlite] Mail loop?

2010-06-14 Thread Adam DeVita
Is it possible for the list admin to seed a message to the list that, if auto-replied, would automatically remove one from the list? This thread, although off the sqlite topic, is still interesting. regards, Adam On Mon, Jun 14, 2010 at 10:06 AM, Black, Michael (IS) < michael.bla...@ngc.com>

Re: [sqlite] Mail loop?

2010-06-14 Thread Black, Michael (IS)
And if Peter isn't the problem you can do a binary search. With 2500 members just keep splitting the list in half and set a test email to each half. Then do it again for the half that shows the loop. 2500->1250->625->318->159->80->40->20->10->5->3->2->1 26 emails will ID the culprit (two at

Re: [sqlite] Mail loop?

2010-06-14 Thread P Kishor
Funny that... I got the "mail loop error" reply to my email below > This is the mail system at host sqlite.org. > > I'm sorry to have to inform you that your message could not > be delivered to one or more recipients. It's attached below. > > For further assistance, please send mail to

Re: [sqlite] Mail loop?

2010-06-14 Thread Black, Michael (IS)
It's been that way since email existed. Mail loops used to cause complete havoc with the internet and mail servers. Especially local loops. People used to just kill their email servers to stop it. And out-of-office replies caused havoc with email lists when they first came out. Mail

Re: [sqlite] Avoiding Database Is Locked Error

2010-06-14 Thread Pavel Ivanov
> This is interesting. I often have situations where I SELECT something > and then do manipulations (INSERT/DELETE/UPDATE) on the db as I > iterate through the results. > > Is this what you mean by your statement? If yes, how should such > situations be avoided, and why? If you issue BEGIN

Re: [sqlite] Mail loop?

2010-06-14 Thread Black, Michael (IS)
Looking at the headers in my loop email I see peter.spi...@* I'll leave the domain blank. Try removing him from the list (I assume he's on the list) and see if the loop stops. Michael D. Black Senior Scientist Northrop Grumman Mission Systems From:

Re: [sqlite] Mail loop?

2010-06-14 Thread Richard Hipp
On Mon, Jun 14, 2010 at 9:09 AM, Black, Michael (IS) wrote: > The problem is that somebody has a .forward or such which loops back to the > list. It's probably in the alias expansion of sqlite-users which expands to > a listfor which a member then expands back to

Re: [sqlite] Mail loop?

2010-06-14 Thread P Kishor
On Mon, Jun 14, 2010 at 8:09 AM, Black, Michael (IS) wrote: > The problem is that somebody has a .forward or such which loops back to the > list.  It's probably in the alias expansion of sqlite-users which expands to > a listfor which a member then expands back to

Re: [sqlite] Mail loop?

2010-06-14 Thread Black, Michael (IS)
The problem is that somebody has a .forward or such which loops back to the list. It's probably in the alias expansion of sqlite-users which expands to a listfor which a member then expands back to sqlite-users. The mail logs may show whether it happens locally or if its a remote user.

Re: [sqlite] Mail loop?

2010-06-14 Thread Richard Hipp
It is not just you. But I have no idea what the problem is or how to fix it. On Mon, Jun 14, 2010 at 8:43 AM, Black, Michael (IS) wrote: > I've been seing this the last 2-3 weeks whenever I email the list...is it > just me??? > > > This is the mail system at host

[sqlite] Mail loop?

2010-06-14 Thread Black, Michael (IS)
I've been seing this the last 2-3 weeks whenever I email the list...is it just me??? This is the mail system at host sqlite.org. I'm sorry to have to inform you that your message could not be delivered to one or more recipients. It's attached below. For further assistance, please send mail

Re: [sqlite] Avoiding Database Is Locked Error

2010-06-14 Thread Robert Latest
On Fri, Jun 11, 2010 at 5:26 PM, Pavel Ivanov wrote: > 1. Ensure that you have no transactions started with SELECT and > continued with INSERT/DELETE/UPDATE This is interesting. I often have situations where I SELECT something and then do manipulations (INSERT/DELETE/UPDATE)

Re: [sqlite] output problem

2010-06-14 Thread Black, Michael (IS)
The command-line interface is not multi-threaded so it all executes in sequence. I can't imagine how many questions/problems would be on this list if it were multi-threaded...yikes!! Michael D. Black Senior Scientist Northrop Grumman Mission Systems From:

Re: [sqlite] Locking issue on NFS filesystem

2010-06-14 Thread Prakash Reddy Bande
Hi, Do you mean I shall use int sqlite3_open_v2( const char *filename, /* Database filename (UTF-8) */ sqlite3 **ppDb, /* OUT: SQLite db handle */ int flags, /* Flags */ const char *zVfs/* Name of VFS module to use */ ); With the last argument

Re: [sqlite] Locking issue on NFS filesystem

2010-06-14 Thread Roger Binns
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 06/14/2010 02:56 AM, Prakash Reddy Bande wrote: > Our application is a simple desktop application with a simple install and run > setup. It is not possible to tell users to apply workaround of sharing the > drive via SMB etc. BTW SMB won't be

[sqlite] output problem

2010-06-14 Thread Mark
Hello, re-visiting this, thanks for the previous help, just a question on timing. Do the commands execute in order, that is, does the .read finish before the .output / .dump starts. It's a timing issue where the programme is waiting on the creation of the dump as a signal to finish, but the

Re: [sqlite] Locking issue on NFS filesystem

2010-06-14 Thread Prakash Reddy Bande
Hi, Our application is a simple desktop application with a simple install and run setup. It is not possible to tell users to apply workaround of sharing the drive via SMB etc. I was hoping we have a way to enable dot file locking. For Mac OS X, sqlite allows SQLITE_ENABLE_LOCKING_STYLE compile

Re: [sqlite] SQLite lets selecting a column that is not inthe Group by clause

2010-06-14 Thread Alexey Pechnikov
2010/6/11 Igor Tandetnik : > SQLite allows "naked" non-grouped columns as an extension (which is > occasionally useful). And this is needed as replacement of the "distinct on" clause. I don't know other way to translate many queries from PostgreSQL to SQLite. -- Best