In case people are wondering. :-D
2011/7/3 Cecil Westerhof cldwester...@gmail.com
I am not sure if it is a SQLite problem, or a Java problem.
While filling a table I get an error Statement is not executing. It
happens in the following code:
System.out.printf(%d, %s, %s\n
2011/7/3 Simon Slavin slav...@bigfraud.org
On 3 Jul 2011, at 12:19am, Cecil Westerhof wrote:
I am not sure if it is a SQLite problem, or a Java problem.
While filling a table I get an error Statement is not executing. It
happens in the following code:
System.out.printf
);
System.out.print(After citation\n);
I see the first output, but not the second. After this there is a -journal
file. What could be happening here?
--
Cecil Westerhof
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin
with a message that the database is locked.
When I make sure I do a COMMIT after a change and immediately a BEGIN
EXCLUSIVE, I do not have to worry about anything.
--
Cecil Westerhof
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi
the program stops with the message that the
table is locked and he can continue where he left of. ;-}
--
Cecil Westerhof
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
I am writing a desktop application in which I want to have exclusive rights.
In this way I do not need to check if the data has changed when the user of
my program wants to change records. Is this possible?
--
Cecil Westerhof
___
sqlite-users mailing
for when I want really
exclusive access.
Thanks. I am going to try it.
--
Cecil Westerhof
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
for me, but I understood it
should not be possible.
I just tried it with BEGIN IMMEDIATE. Gives exactly the same results. So
properly I should stick to the BEGIN IMMEDIATE?
--
Cecil Westerhof
___
sqlite-users mailing list
sqlite-users@sqlite.org
http
application I would not do this, and check that
the data has not changed before doing an update.
--
Cecil Westerhof
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
2011/6/30 Simon Slavin slav...@bigfraud.org
On 30 Jun 2011, at 6:34pm, Cecil Westerhof wrote:
It is a single user application and database.
Sorry about that, Cecil. I was remembering some of the bonehead manoeuvres
some of my former clients have pulled, then complained about
, it is to
late. (When it is raining, you can not repair your roof. When it is not
raining, it is not necessary.)
--
Cecil Westerhof
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
, but in the
general case it could.
Or maybe even better instead of doing * 100 in the first select, do * .01 in
the second.
--
Cecil Westerhof
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
. The first value seems the number of
records (but could also be the last distributed key), the last could be the
lowest key in the table. Is this correct?
But when there are three values –weights–, what is the meaning of the middle
value?
--
Cecil Westerhof
BY weights.measureDate DESC
LIMIT${SHOW_NUMBER}
) ORDER BY weights.measureDate
;
Is a lot neater and also a little more efficient. Thanks again.
--
Cecil Westerhof
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080
FLOAT,
UNIQUE (
categoryID,
measureDate
)
);
The select is on the categoryID and measureDate. The UNIQUE constraint is
good enough, or is there needed more?
--
Cecil Westerhof
___
sqlite-users mailing list
:
sqlite_autoindex_weights_1
Should it not be shown in the first instance also?
--
Cecil Westerhof
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
Because SQLite is not a server, it is possible that someone removes a record
that should not be removed because of a foreign key constraint. How to check
if a database is still correct? There is no check after:
PRAGMA FOREIGN_KEYS = ON;
I checked.
--
Cecil Westerhof
.
--
Cecil Westerhof
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
)
ON UPDATE CASCADE ON DELETE CASCADE
);
Then one could detect missing keys in T1 with:
SELECT DISTINCT T2.id1
FROM T2
LEFT OUTER JOIN T1 ON T2.id1 == T1.id1
WHERE T1.id1 IS NULL
ORDER BY T2.id1
);
Okay, so it can only be done manually?
--
Cecil
foreign_keys on should set a bit in the database so it will no
longer work with foreign_keys off.
That would be an improvement. Of-course, it should then also not work with a
SQLite version who does not set this bit. Otherwise you keep having this
problem.
--
Cecil Westerhof
With LIMIT you can get the first N records of a SELECT. Is it also possible
to get the last N records?
--
Cecil Westerhof
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
2011/6/25 Cecil Westerhof cldwester...@gmail.com
With LIMIT you can get the first N records of a SELECT. Is it also possible
to get the last N records?
Thanks for the answers. I had thought about both options, but was wondering
if I had missed something better. I original opted for the LIMIT
I like to make speed comparisons for sqlite. Asking on the list for
the used code did not give a result, so I like to try it on the wiki.
But you have to login and I do not see a way to register.
--
Cecil Westerhof
___
sqlite-users mailing list
sqlite
to speed.html. The condensed code shown there should
be somewhere uncondensed (I hope). Then I could use this as a starting
point.
Still it would not be wrong to register on the wiki I think.
--
Cecil Westerhof
___
sqlite-users mailing list
sqlite-users
There is no need for new speed comparisons?
2011/6/6 Cecil Westerhof cldwester...@gmail.com:
I saw that there is the need for a speed comparison. I have MySQL
(5.1.53) installed (and when necessary I could install PostgreSQL).
Would it be interesting if I made those tests? If yes, what
am using SQLite version 3.7.5.
--
Cecil Westerhof
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
The help says that .indices shows all indices. But it shows at least
not the PRIMARY KEY indices.
When using:
.indices
I get nothing.
When using:
--
Cecil Westerhof
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi
Something went wrong, so again.
The help says that .indices shows all indices. But it shows at least
not the PRIMARY KEY indices.
When using:
.indices
I get nothing.
When using:
.indices weights
I get:
sqlite_autoindex_weights_1
--
Cecil Westerhof
constraint is disappeared and the DEFAULT is changed.
This sounds extremely unlikely. If I had to guess, I'd suspect you already
have the table in the database, with the old schema, and the new CREATE TABLE
statement fails.
You are right. I made a mistake. My excuses for the noise.
--
Cecil
2011/6/6 Igor Tandetnik itandet...@mvps.org:
Cecil Westerhof cldwester...@gmail.com wrote:
The help says that .indices shows all indices. But it shows at least
not the PRIMARY KEY indices.
When using:
.indices
I get nothing.
Works for me:
sqlite create table t(x text primary key
sqlite_autoindex_weights_1
--
Cecil Westerhof
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
that
this would not be a big problem.
--
Cecil Westerhof
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
32 matches
Mail list logo