Re: [sqlite] Feature Request - RowCount

2014-12-14 Thread Jean-Christophe Deschamps
At 03:14 14/12/2014, you wrote: ´¯¯¯ I take the point that the only possible improvements seem to need alteration to the file structure or added maintenance which may use up cycles for something that just isn't that important to DB use in general - and I have to agree, I too have zero want for

Re: [sqlite] Feature Request - RowCount

2014-12-14 Thread Jean-Christophe Deschamps
Hi Simon, A) In that sqlite_sequence table you mentioned, as an additional column. Always up-to-date. But sqlite_sequence isn't always created. AFAIK it only exists when one or more table exists with an integer primary key autoincrement. B) In the tables prepared by SQLite ANALYZE. If

Re: [sqlite] Will someone be able to explain this weird outcome...

2014-10-10 Thread Jean-Christophe Deschamps
select 7,915 - 5,021 is: select 7, 915 - 5, 021 giving 7 91021 just like select 'a', 915 - 5, 'b' ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Re: [sqlite] Crash when binding default column value

2014-09-24 Thread Jean-Christophe Deschamps
At 21:53 24/09/2014, you wrote: If the default cannot be represented exactly, its rounding will be the least of the difficulties. Not always: in scientific applications I've had column values default to plenty of irrational numbers: fractions of pi, sqrt(2.0) etc. My main gripe is when

Re: [sqlite] Divide by 0 not giving error

2014-09-16 Thread Jean-Christophe Deschamps
Dear forum, MySQL does it too unless ERROR_FOR_DIVISION_BY_ZERO mode is enabled: http://dev.mysql.com/doc/refman/5.0/en/arithmetic-functions.html SQL Server does it too unless SET ARITHABORT is ON: http://technet.microsoft.com/en-us/library/aa259212(v=sql.80).aspx PostgreSQL doesn't do it,

Re: [sqlite] Divide by 0 not giving error

2014-09-16 Thread Jean-Christophe Deschamps
What the SQL standard calls an exception is not necessarily exactly the same as an exception in other programming languages. Granted. If SQLite were to change the division-by-zero handling, it could be reported exactly like most other errors, by returning SQLITE_ERROR from sqlite3_step().

Re: [sqlite] Divide by 0 not giving error

2014-09-16 Thread Jean-Christophe Deschamps
This would means that if ever an SQL statement encounters divide by zero, the application will crash with no way handle the situation gracefully, nor to locate the source of the problem. Seriously, what are you talking about? Why is there no way to handle the error, gracefully otherwise?

Re: [sqlite] Insert optimization

2014-08-23 Thread Jean-Christophe Deschamps
How to improve the write speed then. I've found that in most cases using chained insertion speeds up things dramatically: insert into mytable (x, y, z) values (1, 2, 3), (4, 5, 6), (7, 8, 9), ... If you insert K rows at a time this way your total insert time can by cut by a significant

Re: [sqlite] Hexadecimal integer literals

2014-07-23 Thread Jean-Christophe Deschamps
Conversion of oversized hex into FP would break easily and reveal hardly reproductible across many platforms. Being a support for some languages fora I observe daily how FP inaccuracies is a real-world problem in simple-looking code. The only reasonable thing I can foresee is treat hex as

Re: [sqlite] Is sqlite case-sensitive?

2014-05-18 Thread Jean-Christophe Deschamps
At 22:36 18/05/2014, you wrote: The more I think of it, though, I think that the solution is as simple as converting all letters to lower(/upper) case and converting all whitespace to a single space each, except for within matching [ ], , ' ' or ` `. After that, I can do a memcmp(). You're

Re: [sqlite] Why would batched write operations NOT be faster than individual ones

2014-03-03 Thread Jean-Christophe Deschamps
It's how RAID5 works. Check this page docs http://baarf.com/ about it. This is utter BS. Serious RAID controllers perform parallel I/O on as many drives that are making up a given array. Of course I'm talking of SAS drives here with battery backed-up controller. Kid sister RAID5-6

Re: [sqlite] Why would batched write operations NOT be faster than individual ones

2014-03-03 Thread Jean-Christophe Deschamps
At 21:35 03/03/2014, you wrote: ´¯¯¯ RAID3-4-5 was great when disks were expensive, in 80's an 90's. Now not. A minimal RAID5 needs 3 disks. A minimal RAID10 4. An enterprise disk SAS 15Krpm 146 GB 6G is $350, and a not enterprise grade cheaper and bigger. Now RAID1E and RAID10E give more

Re: [sqlite] How should I use parenthesis?

2014-01-28 Thread Jean-Christophe Deschamps
Perhaps you want: select * from ( select * from A where x in (subselectA) left outer join ( select * from B where y in (subselectB) ) as a on -- something ) as A1 UNION ALL select * from ( select * from B where y in (subselectC) left

[sqlite] How should I use parenthesis?

2014-01-27 Thread Jean-Christophe Deschamps
Dear list, I'm trying to find the correct syntaxt for this, but I hit a syntax error each time: either SQLite shokes on outer parenthesis or on union all. ( select * from A where x in (subselectA) left outer join select * from B where y in (subselectB) ) union all ( -- -- error select *

Re: [sqlite] Concrete example of corruption

2013-12-11 Thread Jean-Christophe Deschamps
At 08:45 11/12/2013, you wrote: My case wasn't about messing anything up, but simply moving a document. Just like moving the canvas while the artist is painting? Or is it moving the notebook while the schoolkid writes on it? This is prone to produce dribbles or worse, in my view. I fail to

Re: [sqlite] Intended use case for 'without rowid'?

2013-11-17 Thread Jean-Christophe Deschamps
How so? An AFTER INSERT trigger has the value in new.yourPKColumn. Can you show a scenario where this is insufficient, and a hypothetical last_insert_primary_key would save the day? You're correct, there is no situation where such a thing would make sense.

Re: [sqlite] Intended use case for 'without rowid'?

2013-11-15 Thread Jean-Christophe Deschamps
At 15:45 15/11/2013, you wrote: last_insert_rowid() is needed for autoincremented keys. WITHOUT ROWID tables do not have an autoincrementing key. Your program has to generate or get the key in some other way, so it knows the value even before the record is inserted. last_insert_primary_key

Re: [sqlite] collation for german Umlaute

2013-10-31 Thread Jean-Christophe Deschamps
Search the Internet for an SQLite extension called unifuzz.c and see if that does what you want in the way of character folding. I have a copy of the code on my other computer if you cannot find the original authors original code. Here is the download link:

Re: [sqlite] racing with date('now') (was: Select with dates)

2013-09-16 Thread Jean-Christophe Deschamps
There are perhaps 2 million applications in the wild that use SQLite, so it will be difficult to check them all. But one can easily imagine that one or more of those two million applications does something like this: SELECT current_timestamp, * FROM tab; And then runs sqlite3_step()

Re: [sqlite] racing with date('now') (was: Select with dates)

2013-09-16 Thread Jean-Christophe Deschamps
There are other ways to get a consistent 'now' across an entire SQL statement: Of course! This issue is sufficiently obscure that it is not worth adding (and testing and documenting and supporting forever) yet another pragma. I personally wouldn't call it so obscure as it pops up

Re: [sqlite] Is there a way to return the row number? (NOTthe rowid)

2013-07-03 Thread Jean-Christophe Deschamps
At 05:49 04/07/2013, you wrote: ´¯¯¯ But in the bigger context of this discussion, I think SQLite might consider a row_number() function, or (my personal preference) some type of virtual column, such as _row_number_. I suggest that term, since that's what Oracle, MS SQL Server, and

Re: [sqlite] autoincrement and primary key

2013-05-20 Thread Jean-Christophe Deschamps
I would like to use INTEGER PRIMARY KEY, but I would like to disable its implicit AUTOINCREMENT feature. Namely, if INSERT specifies value of the column, I would like uniqueness to be enforced, but if NULL is supplied, I would like the operation to fail instead of advancing key to a new

Re: [sqlite] Create Table oddity

2013-05-19 Thread Jean-Christophe Deschamps
I've been talking with Bogdan about a change to SQLite Expert and ran across something I did NOT expect. I have this schema: CREATE TABLE [tApplicationPaths] ( [AppID] INTEGER PRIMARY KEY, [ApplicationName] CHAR, [ApplicationMonitorPath] CHAR, [SearchSubDirs] BOOL DEFAULT 1,

Re: [sqlite] Create Table oddity

2013-05-19 Thread Jean-Christophe Deschamps
While Keith is closer to the right explanation than I was, there are a couple of points: default does not need a constant: a function call is valid as well, e.g. date() The syntax: CREATE TABLE tApplicationPaths ( AppID INTEGER PRIMARY KEY, ApplicationName CHAR, ApplicationMonitorPath

Re: [sqlite] Create Table oddity

2013-05-19 Thread Jean-Christophe Deschamps
For me this inserts the text 'AppID' ... Sorry my bad, I tried a dummy table but made the type integer not char. So it was displaying 0 but hold text indeed. It's too late here for me to post anything, must be age! ___ sqlite-users mailing list

Re: [sqlite] How people test db failures

2013-05-03 Thread Jean-Christophe Deschamps
At 07:31 03/05/2013, you wrote: Problem is, how do I prove to the customer/user that it is working as expected no matter what? There are two important points in your question. The second (!) is prove. The first is as expected. Let me expand on why. For a system (irrespective of its nature

Re: [sqlite] SQLite 3.7.17 preview - 2x faster?

2013-04-07 Thread Jean-Christophe Deschamps
Hi Max, The link is dead. I'd like to know more about this so can you provide us with a live link? Thanks. ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Re: [sqlite] ANN: user-defined functions

2013-03-27 Thread Jean-Christophe Deschamps
... so I think you must be using a really old copy. That's correct: I downloaded this source years ago. And yes, argc for SQLite functions has a different semantics from main(). Thanks for the heads up. -- mailto:j...@q-e-d.orgj...@antichoc.net

Re: [sqlite] ANN: user-defined functions

2013-03-25 Thread Jean-Christophe Deschamps
At some point in time I needed a few math functions and tried to use the contributed maths extension. I found a couple of mistakes, mostly sqrt() requiring two arguments, and something else I can't remember right now. That by itself may indicate that the math functions never went into full

Re: [sqlite] ANN: user-defined functions

2013-03-25 Thread Jean-Christophe Deschamps
At 15:46 25/03/2013, you wrote: ´¯¯¯ The sqrt() function takes only one argument, at least. It checks assert( argc==2 ); at line 503 AFAIK. This library also contains several string functions, but it is meant as a general extension library, not a math specific library. I have my

Re: [sqlite] Sqlite crashes on FTS query

2013-03-24 Thread Jean-Christophe Deschamps
At 23:12 23/03/2013, you wrote: ´¯¯¯ Here's how to reproduce it: - Get the latest sqlite shell for windows: http://www.sqlite.org/2013/sqlite-shell-win32-x86-3071600.zip - Download and extract this database: https://dl.dropbox.com/u/242199/db.zip - Run this query: SELECT rowid FROM ad_text

Re: [sqlite] Using SQLite on a networkshare

2013-01-07 Thread Jean-Christophe Deschamps
Raymond, So I checked some server/client solutions from http://www.sqlite.org/cvstrac/wiki?p=SqliteNetwork. But as there wasn't a solution that supported my script language (Autoit) I ended up writing my own server/client solution. This worked for me, but I still have some questions regarding

Re: [sqlite] How to verify referential integrity of SQLite database

2012-12-13 Thread Jean-Christophe Deschamps
Jay A. Kreibich wrote: I can also see situations when someone might want to run one set or the other set of checks. Breaking it out, so that these checks are done by a different PRAGMA (integrity_check_v2 ?) seems like a wise idea. Indeed; with a separate PRAGMA

Re: [sqlite] Subject: Re: Simple SQLite-based spreadsheet?

2012-12-08 Thread Jean-Christophe Deschamps
Ok, but where are the large number of tools that would do that? Features: - very fast, very basic spreadsheet (not based on Excel or Libre/OpenOffice) - saves data in SQLite - very easy to create new tables + columns - lets the user edit rows/columns as easily as in Excel - data can be sorted

Re: [sqlite] Subject: Re: Simple SQLite-based spreadsheet?

2012-12-08 Thread Jean-Christophe Deschamps
Let's see. 100.000 licenses @ $20 = $2.000.000 Cayman S = $65.000 www.gizmag.com/porsche-cayman/25260/ = 30 cars. Kim Dotcom! :-) What are those $20 suppose to pay for? ___ sqlite-users mailing list sqlite-users@sqlite.org

Re: [sqlite] sqllite db - remote access on a shared host

2012-07-20 Thread Jean-Christophe Deschamps
Hi, I there any application/program paid or free that will allow me to connect to a remote shared host sqlite DB. A program which will allow me to make changes to the db design and do backups. I have very little control on the shared host. I am hoping for something that will let me connect

Re: [sqlite] Advice on the proper use of sqlite3 - Database Connection Handle

2012-05-24 Thread Jean-Christophe Deschamps
Also it suggests that transaction was began as read-only (with a select statement) and then there was attempt to transform it to a writing transaction (with insert, update or delete statement) when there was another writing transaction in progress waiting for this transaction to finish. and

Re: [sqlite] ICU extension not working as expected

2012-05-23 Thread Jean-Christophe Deschamps
I've downloaded and compiled icu.c according to the instructions in the included README (though I had to add -fPIC to the compiler options). Now, when searching a table, I'm not getting the kind of diacritic-insensitive behavior I was expecting: sqlite .load lib/libSQLiteICU.so sqlite

Re: [sqlite] Escape table and column names

2012-05-16 Thread Jean-Christophe Deschamps
What about if table name or column name contains that escape character? Do I need to escape it in another way? http://sqlite.org/faq.html#q14 This FAQ topic doesn't apply here. We're talking about schema names or keywords, while FAQ#14 is literal escaping a single quote. Given that we

Re: [sqlite] Escape table and column names

2012-05-16 Thread Jean-Christophe Deschamps
This FAQ topic doesn't apply here. We're talking about schema names or keywords, while FAQ#14 is literal escaping a single quote. create table foobar ( baz ); select * from onetwo; select * from sqlite_master; table|foobar|foobar|9|CREATE TABLE foobar ( baz ) I knew this particular

Re: [sqlite] Escape table and column names

2012-05-16 Thread Jean-Christophe Deschamps
At 13:55 16/05/2012, you wrote: ´¯¯¯ Those all work. You are getting an error because you didn't supply any column in the table `--- Oops, that's what happens when you try doing too many things at the same time. Nonetheless, SQLite version 3.7.11 2012-03-20 11:35:50 Enter .help for

Re: [sqlite] is SQLite the right tool to analyze a 44GB file

2012-05-06 Thread Jean-Christophe Deschamps
Not sure I buy your test cases. I don't either, but for diverging reasons. Fields containg double quotes must be in double quotes. So only one of your examples is valid first,second,third I'll have to fix that one. No, it's invalid. Apply to the same rules that apply to ' for

Re: [sqlite] is SQLite the right tool to analyze a 44GB file

2012-05-06 Thread Jean-Christophe Deschamps
Hi Simon, My test cases weren't intended to supply data, they're crash tests. I have faith that Mike's software correctly interprets syntactically correct cases. I was interested in making sure it didn't crash, hang or spew on syntactic errors. You're right. JcD

Re: [sqlite] Selecting every nth row efficiently

2012-04-04 Thread Jean-Christophe Deschamps
I have a big database with timestamps and sensor readings, which I access with SELECT to have gnuplot draw graphs. However, sometimes I have readings every minute and want to plot several years of data, and feeding everything to gnuplot is overkill. In these cases it would be sufficient to

Re: [sqlite] Selecting every nth row efficiently

2012-04-04 Thread Jean-Christophe Deschamps
Hit Send inadvertandly, sorry. My rowid isn't increasing with something predictable, so I can't do something like WHERE rowid % n = 0. I can use WHERE random() % n = 0 giving me sort of what I want (better than row % n, but I still need something better). If your sampling is essentially

Re: [sqlite] Selecting every nth row efficiently

2012-04-04 Thread Jean-Christophe Deschamps
This is a good suggestion. A drawback is that the interval can't be too small otherwise there is a risk that a sample would be missed. So I will get more samples than I need. In you example, if there is a sample every second more or less, I would usually get 3-4 samples every hour instead of

Re: [sqlite] Hashing 2 SQLite db files with the same data

2012-04-03 Thread Jean-Christophe Deschamps
But if data was added exactly in the same way/order shouldn't the counters all count to the same end result if the process was repeated at a later time on a another machine? Maybe, maybe not. Since the file format specifies meaningful fields only (my guess) it's quite possible that the

Re: [sqlite] Suggestion about hard-coded time string format YYYY-MM-DD

2012-04-02 Thread Jean-Christophe Deschamps
At 23:44 02/04/2012, you wrote: I wonder whether it respects languages. These don't, but u8_strcoll et al supposedly do, based on LC_COLLATE locale category. Herein lies the problem: if you build an index using these functions while running under locale A, then try to run queries against

Re: [sqlite] Hashing 2 SQLite db files with the same data

2012-04-02 Thread Jean-Christophe Deschamps
Do you feel that the platform - Hardware / OS / some other factor could influence the way SQLite performed its sequence? Instead of trying to compare the hashes of DB files themselves, you appear to want a strict comparison of sets in the contents of the DBs. For instance, changing the

Re: [sqlite] NaN in, 0.0 out?

2012-03-24 Thread Jean-Christophe Deschamps
Stephan, Occasionally the sensor has a fault or the values are invalid (like negative temperatures). To mark them once and for all as invalid, the faulty values are replaced (in a C environment) by NaNs. Then the data are inserted into the database with a C porgram, in a loop with the

Re: [sqlite] The number of parameters passed to user functions

2012-03-13 Thread Jean-Christophe Deschamps
Hi Max, Is there a way to know the number of parameters passed for user function with undefined argument count (nArg = -1 in the Sqlite3_create_function call). I could not find a function specific to this task and thought that I at least can check sqlite3_values array members for zero for my

Re: [sqlite] Unique indexes apparently not working

2012-03-12 Thread Jean-Christophe Deschamps
CREATE UNIQUE INDEX IF NOT EXISTS 'userIdentityByUcgID'ON 'user_identity' (shortName ASC, ucgID ASC); As a general rule you should reserve single quotes to string litterals. Either leave schema names alone (no whitespace, not keyword) or use [my pretty table], my favorite table, `my

Re: [sqlite] Cyrillic support

2012-03-10 Thread Jean-Christophe Deschamps
I am using the newest version of SQLite. How do I enable support for Cyrillic letters? Whenever I enter something in the DB with Cyrillic letters it gets saved like this ?? This would happen if your Unicode Cyrillic text gets converted (read emasculated) to ANSI using a non-cyrillic

Re: [sqlite] Cyrillic support

2012-03-10 Thread Jean-Christophe Deschamps
You just need to convert it to UTF-8 before insert, then convert it back when you pull the data. UTF-16-UTF8 - insert Select - UTF8-UTF16 There are 16-bit SQLite APIs for that, no conversion needed actually. But of course it all depends of the wrapper you use, if any.

Re: [sqlite] Constraint error messages

2012-02-29 Thread Jean-Christophe Deschamps
Me too. Either as a new standard way of working, or as something which can be turned on and off with a PRAGMA. I accept that SQLite is meant to be fast, but having SQLite spit out which check was violated will result in my app running faster and more dependably than when I build the same

Re: [sqlite] Incompatible versions of SQLite on same system

2012-01-16 Thread Jean-Christophe Deschamps
At 01:08 17/01/2012, you wrote: ´¯¯¯ Richard, Simon, and you are seeing eye-to-eye on this. Earlier in the thread (since trimmed, of course), it was stated that SQLite was designed to be tiny so that each app could include the entire system without draining resources significantly (this would

Re: [sqlite] finding pairwise similarity

2012-01-14 Thread Jean-Christophe Deschamps
where `similarity` is a measure of overlap of `t` between each pair of `c` and is calculated as the number of `t` common between a given pair divided by the total number of unique `t` in the pair. Just like Igor, I take unique `t` in pair to mean distinct `t` in pair. I want the result

Re: [sqlite] SQL help

2011-12-22 Thread Jean-Christophe Deschamps
At 18:09 22/12/2011, you wrote: DELETE FROM t WHERE rowid != (SELECT t2.rowid FROM t t2 where t2.num = t.num ORDER BY t2.date LIMIT 1); Are you sure that date will collate correctly, as entries appear to be in dd/mm/ format? Dates in non_ISO format are always a pain. IMHO if dates are

Re: [sqlite] SQLITE_BUSY

2011-11-26 Thread Jean-Christophe Deschamps
If your statement is a SELECT returning 50 rows, and you've already read 20 of them by the time you get the _BUSY, do you get the first 20 again after doing the _reset ? I don't believe we can get _BUSY in the middle of a SELECT. Am I wrong?

Re: [sqlite] SQLITE_BUSY

2011-11-26 Thread Jean-Christophe Deschamps
Hi Simon, Ah, so it's the first _step which does the locking, rather than the _prepare. That makes sense to me. If I had a serious application using, say, a hundred of different prepared queries, I'd rather batch-prepare them all up front then use them when needed without asking question.

Re: [sqlite] SQLITE_BUSY

2011-11-26 Thread Jean-Christophe Deschamps
And it's convenient to be able to do the prepare during startup. I've just never had to worry about this situation. It means you have to do special handling for the first _step, but it's a reasonably compact way of handling the potential problem. I can't use prepared statements in

Re: [sqlite] SQLITE_BUSY

2011-11-26 Thread Jean-Christophe Deschamps
So I make up for it by using an 'exec' which executes only the first command, and by hashing the command so that tampering with it would make it fail the hash. AFAIK sqlite3_exec will hapilly prepare and run more than one statements in a row. I use it all the time. But there's no reason

Re: [sqlite] can you select series with SQL?

2011-11-19 Thread Jean-Christophe Deschamps
ID 1 2 3 4 11 12 13 14 If we have the 14 (we know to start at 14) can we select the records 14, 13, 12 and 11, so the consecutive numbers, going down from 14? Sure: select id from yourtable where id = 14 limit 4 order by id desc;

Re: [sqlite] can you select series with SQL?

2011-11-19 Thread Jean-Christophe Deschamps
so the consecutive numbers, going down from 14? Sorry I interpreted the question in a dumb way. Igor is certainly right (as usual). ___ sqlite-users mailing list sqlite-users@sqlite.org

Re: [sqlite] Export Blob data from sqlite database to html

2011-11-17 Thread Jean-Christophe Deschamps
At 10:02 16/11/2011, you wrote: Basically my problem is exporting the database so the time stamps appear in hex the data blobs appear in either text (ascii) or as a jpeg image depending on the data in type field. I have tried numerous sqlite browsers without success. Looks like a job for

Re: [sqlite] SQLITE3 Runs out of memory.

2011-11-17 Thread Jean-Christophe Deschamps
Loop for 61153 records start rowIndex at 0 sqlite3_prepare_v2 (SELECT id, blobdata FROM Table30KB Where id = rowIndex) sqlite3_step() sqlite3_finialize() End Make that sqlite3_prepare_v2 (SELECT id, blobdata FROM Table30KB) Do sqlite3_step() // handle errors somehow (busy, ...) Until

Re: [sqlite] GROUP BY With ASC/DESC

2011-11-11 Thread Jean-Christophe Deschamps
SELECT name, color, Sum(price) AS price FROM key_table5 WHERE price '2' GROUP BY color ASC ORDER BY name ASC LIMIT 50 OFFSET 0 when either ASC or DESC is used with the GROUP BY clause. Is this a bug or a query statement inaccuracy on my part? Looks like a documentation bug. Indeed the

Re: [sqlite] WAL and local UNC filenames

2011-11-08 Thread Jean-Christophe Deschamps
Hi Pavel, I can't answer this question. Maybe it's something like all operations are successful but memory mapping is not actually shared between processes. So every process sees its own copy and assumes that no other process works with database, thus database can be corrupted in many possible

Re: [sqlite] WAL and local UNC filenames

2011-11-07 Thread Jean-Christophe Deschamps
Pavel, This is not a local file. Even if you use your hostname as netname file is still retrieved through network stack. And I guess SAMBA doesn't work well with memory mapped files (in addition to all problems with locking). True but why did I get no error? Since MMF don't cope with network

[sqlite] WAL and local UNC filenames

2011-11-06 Thread Jean-Christophe Deschamps
Dear List, If a DB in WAL mode is opened using a UNC path refering to a _local_ drive, weird things happen until the DB gets corrupted but AFAIK no error code is thrown. Windows doesn't seem to open the memory mapped file if it has a UNC path. Can someone confirm? I don't know if this

Re: [sqlite] WAL and local UNC filenames

2011-11-06 Thread Jean-Christophe Deschamps
Does your path begin with 'file:' ? No, simply \\netname\share\path\test.db ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Re: [sqlite] concurrent writes and reads to /from DB

2011-11-05 Thread Jean-Christophe Deschamps
Is there a good practice /setting for such high rate of concurrent writes with reads ? I understand that multiple readers with single writer at any time t is the model which sqlite has with various locks/states (unlocked, pending , shared , reserved , exclusive). with is a bit unclear. To

Re: [sqlite] sql server management studio like tool for SQLite

2011-11-05 Thread Jean-Christophe Deschamps
At 21:46 05/11/2011, you wrote: In my opinion spending $59 for the Pro version is a **no-brainer** for many reasons. Seconded! Time saved in few days pays back the ticket. ___ sqlite-users mailing list sqlite-users@sqlite.org

Re: [sqlite] SQLite Expert

2011-10-30 Thread Jean-Christophe Deschamps
On 30 Oct 2011, at 7:50pm, Abair Heart wrote: Searching the archives implies, that sqlite expert hasn't been asked about. Has anyone tried it yet? Is the program safe? time-saving? Give me the $59 and a Windows computer and I'll check it out. Simon. As a long-term fan user of SQLite

Re: [sqlite] Error messages from user-defined functions calling sqlite3_result_error() requires sqlite3_finalize?

2011-10-27 Thread Jean-Christophe Deschamps
Fixed here: http://www.sqlite.org/src/info/8f88cc4e61 If you use sqlite3_prepare_v2() to prepare the statement, the custom error message will now be available after sqlite3_step() returns. Many thanks Dan. ___ sqlite-users mailing list

[sqlite] sqlite3_errcode() and sqlite3_errmsg()

2011-10-26 Thread Jean-Christophe Deschamps
Dear list, It seems that after sqlite3_prepare_v2() and sqlite3_step() we have that sqlite3_errcode() returns meaningful result right away when some function invokes sqlite3_result_error() during sqlite3_step(). OK so far. The issue is with sqlite3_errmsg(). If a function post an ad-hoc

Re: [sqlite] Error messages from user-defined functions calling sqlite3_result_error() requires sqlite3_finalize?

2011-10-26 Thread Jean-Christophe Deschamps
Funny coincidence in time, I just posted on the same subject while your post was being received! ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Re: [sqlite] Trouble about ordering records by name (or any varchar column)

2011-10-19 Thread Jean-Christophe Deschamps
In my SQLite 3 Database, I have some records with Turkish characters such as í, Ü, İ etc. When I select my values with SELECT * FROM TABLE ORDER BY COLUMN_NAME query, the records that begin with these characters are coming at the end. Bare bone SQLite only collates correctly on the

Re: [sqlite] DOMAIN new error code

2011-10-17 Thread Jean-Christophe Deschamps
That is the default text for the error code, but your extension should provide different text. That's an half-backed solution. I know of no application which test error codes AND THEN test error message _content_ before selecting a way to deal with the error. Most of the times, the

Re: [sqlite] is not null and index

2011-10-17 Thread Jean-Christophe Deschamps
Yoav Apter yo...@checkpoint.com wrote: I have the following table: CREATE TABLE x ('col1', 'col2', 'col3') Create col1index on x ('col1') When I run this query: select * from x where col1 is null I see the index on x is used. When I run this query: select * from x where col1 is NOT null

[sqlite] DOMAIN new error code

2011-10-16 Thread Jean-Christophe Deschamps
I have the need to use some math extension functions. While testing them I found it very difficult to select an informative error code in case of a domain error, like sqrt(-1). Would it be sensible to create a new generic error code in some next release for extension functions to report such

Re: [sqlite] Please provide a precompiled Win64 binary

2011-10-15 Thread Jean-Christophe Deschamps
However, the precompiled Windows binary is currently only available as a 32-bit library. I'd like to request that a precompiled Win64 Windows binary be added to the list of standard build outputs and downloads available from the sqlite.org site. This will be consistent with the basic Win32

Re: [sqlite] Time and date functions

2011-10-15 Thread Jean-Christophe Deschamps
select * from TABLE where DATE between date('now','-7 days','Weekday 0') and date('now','-7 days','Weekday 6'); Let me try this: select * from TABLE where DATE between date('now','-6 days','Weekday 0') and date('now','Weekday 6'); or compare week numbers (%W specification) [slower]

Re: [sqlite] UPDATE of field deletes record

2011-09-15 Thread Jean-Christophe Deschamps
with an existing record, and a fieldname that is in a column that has a UNIQUE INDEX, if I do sqlite_exec(UPDATE database SET fieldname=sqlite_escape(get calculator batteries) WHERE fieldname=sqlite_escape(get hp50g calc cells); this code actually deletes the record. it should not. I don't

Re: [sqlite] UPDATE of field deletes record

2011-09-15 Thread Jean-Christophe Deschamps
the test code can be seen at http://www.autoitscript.com/trac/autoit/ticket/2012 Are you sure it is gone? I'm not familiar with this API, but you appear to be finalizing the query BEFORE you extract rows from it. In the native API, that's not valid, making the code report no rows,

Re: [sqlite] Encoding and Collation

2011-09-13 Thread Jean-Christophe Deschamps
It's very easy to replace the SQLite functions with user-defined ones, so if someone wants to go the easy way (partial support for just the common western scripts) it's easy. And already done by many, if you search the mailing list. It's exactly what I'm looking for. It could be my

Re: [sqlite] Max page count not being remembered across close/open in SQLite 3.7.6.3

2011-08-30 Thread Jean-Christophe Deschamps
Most PRAGMAs, including others which modify engine behaviour like recursive_triggers, are not stored in the database but have to be restated every time you open the database file. Ok, thanks, If that is the case for this PRAGMA I did not realise. Similar to the page_count PRAGMA I would

Re: [sqlite] Max page count not being remembered across close/open in SQLite 3.7.6.3

2011-08-30 Thread Jean-Christophe Deschamps
BTW this pragma should be applicable to a list of tables or * for all tables. I realize I didn't state I was talking about recursive_triggers pragma. Sorry for not having made this clear in the previous post. -- mailto:j...@q-e-d.orgj...@antichoc.net

Re: [sqlite] Max page count not being remembered across close/open in SQLite 3.7.6.3

2011-08-30 Thread Jean-Christophe Deschamps
That is exactly the problem: such limits are app-specific logic, and that 3rd-party db manager cannot know about app-specific logic. No, that is a metadata which belongs to the DB. Forcing this pragma to always apply would in fact hinder some cases, e.g. creating a backup copy of a table

Re: [sqlite] Custom Collation comparing only firt character?

2011-08-27 Thread Jean-Christophe Deschamps
Cool - can you please post a link to the sources? Sure, here you are: http://dl.dropbox.com/u/26433628/unifuzz.zip The .c source contains all details (and all the bugs). -- mailto:j...@q-e-d.orgj...@antichoc.net ___ sqlite-users mailing list

Re: [sqlite] Custom Collation comparing only firt character?

2011-08-26 Thread Jean-Christophe Deschamps
Roberto, Though I cannot use DLLs since it is an iPhone iOS (MacOSX) operational system. I made it DLL by default at build time since it fits my needs. You can still compile the extension (or part of it) as a standard .o obj and statically link it into your application. I was hoping for a

Re: [sqlite] Add/modify a table in the existing Sqlite database in client side.

2011-08-22 Thread Jean-Christophe Deschamps
I am using C# windows application(.Net2010) with sqlite, and i need to change the database table. Can you pls let me know, how to add or modify a new column/ table in the existing Sqlite database that is in my client desktop machine. I want the existing database to have its data, and

Re: [sqlite] SQLite + unicode

2011-08-20 Thread Jean-Christophe Deschamps
I try this function. Do you have Visual Studio. i show you my example. NOCaut wrote: char * unicode_to_1251(wchar_t *unicode_string) Why are you converting Unicode to 1251? This is a lossy conversion in the general case. Work with Unicode strings end-to-end, using the UTF encoding of

Re: [sqlite] null handling import

2011-08-14 Thread Jean-Christophe Deschamps
Mattew, Obviously I am not as well versed in sqlite as you are. I hate to hate myself, but am still continuing with reading somewhat ancient files into a somewhat cohorrent database. Thanking you for your time and trouble, Matthew p.s. shame about the parsing of comma delimited

Re: [sqlite] Strange result using JOIN

2011-07-22 Thread Jean-Christophe Deschamps
I understand that but why the same query, with the same data, return two different result using different SQLite-based Win32 applications ? SQL is essentially based on set theory. Sets don't have intrinsic ordering and may be enumerated in whatever order. What you think are distinct results

Re: [sqlite] Hidding records from the application

2011-07-16 Thread Jean-Christophe Deschamps
I want to make things clear. there are some rules in my system, such as : process whose name is proc_host can see all the records, and process whose name is proc_client1 can see all the records except rowid 1. First, keep away of relying on rowid values since they may change if you don't

Re: [sqlite] How to search for multiple values in a column including null without repeating column name ?

2011-07-02 Thread Jean-Christophe Deschamps
Michael, Are you saying that 1 below doesn't show up in the first query result? sqlite create table t(i int,name string); sqlite insert into t values(1,NULL); sqlite insert into t values(2,'two'); sqlite select * from t where i in (1,2,3,null); i|name 1| 2|two sqlite select * from t where i in

Re: [sqlite] Continuous exclusive lock

2011-06-30 Thread Jean-Christophe Deschamps
Cecil, Is good enough for me. My only problem is that between reading the data and writing the changes, I want to be sure that no one has changed the data. For me that is enough. For this, a simple Begin immediate; ... Commit; embrassing you read-modify-write block will do. Doesn't block

Re: [sqlite] Continuous exclusive lock

2011-06-30 Thread Jean-Christophe Deschamps
Cecil, Do I understand it correctly that after a commit the database is writeable again for others? Yes. In that case it is maybe better to do a: *PRAGMA locking_mode = EXCLUSIVE; *followed by an update of the database. As long as the application is running, I want to be sure that

Re: [sqlite] Continuous exclusive lock

2011-06-30 Thread Jean-Christophe Deschamps
If you _need_ exclusiveaccess all along, then start app, begin exclusive, do your stuf, commit and exit. The 'problem' is that the application can run for the whole day. Granted. And the 'problem' is ??? What I don't get is you later say it's a single-user, single-app use. You don't

  1   2   3   4   >