Re: [sqlite] How can I load big file into a sqlite database?

2008-08-29 Thread Filipe Madureira
Hi, I am interested in this issue also. I didn't understand the first part of your answer. sqlite3 databasefile infile ?? The .import FILE TABLE works, but it is from CLI. How can I do it in my C++ application using the sqlite3? Thanks Filipe Madureira Alexandre Courbot wrote: I

Re: [sqlite] How can I load big file into a sqlite database?

2008-08-29 Thread Alexandre Courbot
I am interested in this issue also. I didn't understand the first part of your answer. sqlite3 databasefile infile ?? The .import FILE TABLE works, but it is from CLI. How can I do it in my C++ application using the sqlite3? An equivalent would be to read the file line by line and execute

Re: [sqlite] How can I load big file into a sqlite database?

2008-08-29 Thread Filipe Madureira
That's what I do. I was looking for a kind of pre-built solution that could have better performance in loading a table than to do a INSERT for each line inside a transaction. But thanks Filipe Madureira Alexandre Courbot wrote: I am interested in this issue also. I didn't understand the

Re: [sqlite] Incorporating FTS into existing database schema

2008-08-29 Thread Brandon, Nicholas (UK)
Any advice will be greatly appreciated. If there is any FM I should R kindly point me to it :) FTS information is difficult to find. Try http://www.sqlite.org/cvstrac/wiki?p=FtsOne I can't remember how I came across this link because I can never find it on the SQLite website. Ignore

[sqlite] ParseSchema's virtual machine instructions

2008-08-29 Thread Mrinal Kant
Is there a feature (like explain) which returns the sequence of virtual machine instructions that ParseSchema creates? -Mrinal ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Re: [sqlite] sqlite3: floating point behaviour has changed

2008-08-29 Thread Jonathan H N Chin
forcemerge 488864 497047 thanks I suck. I should have looked at the existing bugs. It is a problem. It has already been fixed. See: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=488864 Perhaps fedora has an updated package too? I wrote: On the sqlite-users mailing list, bakers wrote:

[sqlite] sqlite3: floating point behaviour has changed

2008-08-29 Thread Jonathan H N Chin
Package: sqlite3 Version: 3.5.9-3 Severity: normal Sending to Debian Bug Tracking System and the sqlite-users list. On the sqlite-users mailing list, bakers wrote: Igor Tandetnik wrote: Scott Baker [EMAIL PROTECTED] wrote: Did I do something wrong? SQLite version 3.5.9 Enter .help for

Re: [sqlite] Broken indexes ...

2008-08-29 Thread Alexey Pechnikov
Hello! В сообщении от Friday 29 August 2008 02:29:37 D. Richard Hipp написал(а): Run this command:      sqlite3 old.db .dump | sqlite3 new.db This command lost information about page size ans some other. Best regards, Alexey. ___ sqlite-users

Re: [sqlite] Incorporating FTS into existing database schema

2008-08-29 Thread Scott Hess
On Thu, Aug 28, 2008 at 8:15 PM, Andreas Ntaflos [EMAIL PROTECTED] wrote: Notice the snippet bit: it takes the virtual table name (fts_paper in the case of your examples) instead of the column name as an argument, which I find curious. Your query would fail with the following error message:

Re: [sqlite] problem using random() in queries

2008-08-29 Thread Noah Hart
Richard, Before you fix it, I'm not convinced it is broken. From MS SQL server create table _names (N varchar(5)); insert into _names values('a'); insert into _names values('b'); insert into _names values('c'); insert into _names values('d'); insert into _names values('e'); select N, RAND() as

Re: [sqlite] problem using random() in queries

2008-08-29 Thread Igor Tandetnik
Noah Hart [EMAIL PROTECTED] wrote: I would expect that multiple calls to random always return different values, even if in the same line. The fact that we are aliasing random by a column name makes no difference to me. What about this: select name, RNDValue from ( select name, random()

Re: [sqlite] problem using random() in queries

2008-08-29 Thread Noah Hart
I agree with you here. It is a temporary table that should FIX the values. Interestingly select name, RNDValue from ( select 'name', random() as RNDValue ) where RNDValue 0; only calls random once and works as expected. 0|Trace|0|0|0|explain select name, RNDValuefrom (select 'name',

[sqlite] Pending Queue?

2008-08-29 Thread Scott . Chapman
In Section 7.0, Transaction Control At The SQL Level, at http://www.sqlite.org/lockingv3.html, it says: If the SQL COMMIT command turns autocommit on and the autocommit logic then tries to commit change but fails because some other process is holding a SHARED lock, then autocommit is turned

Re: [sqlite] problem using random() in queries

2008-08-29 Thread cmartin
mySQL differs from MS SQL in it random function handling: SELECT i, RAND() AS R1, RAND() AS R2 FROM z where RAND() .4; iR1R2 1 0.531666 0.692986 3 0.743755 0.906643 4 0.789811 0.04321 6 0.977431 0.576784 8 0.284047 0.336876 Different values for R1 and R2 (each call

[sqlite] Writing an image to the database as a BLOB

2008-08-29 Thread Jared Miller
Hello, I am having trouble figuring out how to successfully write an image to the SQLite database as a Blob, using C++. I have an HBITMAP that I would like to be able to store to and retrieve from the DB. If I understand what I have read correctly, I am supposed to write out the actual byte

Re: [sqlite] Writing an image to the database as a BLOB

2008-08-29 Thread Jeffrey Becker
Are you able to load and save the bitmap to a file? On Fri, Aug 29, 2008 at 2:13 PM, Jared Miller [EMAIL PROTECTED] wrote: Hello, I am having trouble figuring out how to successfully write an image to the SQLite database as a Blob, using C++. I have an HBITMAP that I would like to be able

Re: [sqlite] Writing an image to the database as a BLOB

2008-08-29 Thread Jared Miller
Yes I am able to do that. I fill out the BITMAPFILEHEADER and BITMAPINFOHEADER information for the image, and then I do this: bmpFile.Write(bitmapfileheader, sizeof(BITMAPFILEHEADER)); bmpFile.Write(bitmapinfoheader, sizeof(BITMAPINFOHEADER)); bmpFile.Write(pbyBitmap, size); //pbyBitmap is the

[sqlite] SQLite 3.6.1 memory leak?

2008-08-29 Thread Ulric Auger
Hi, Since I updated to SQLite 3.6.1 I have a memory leak when my application exits. If I compile using SQLite 3.5.8 I don't have the memory leak. VS 2005 dump: Detected memory leaks! Dumping objects - c:\dev\mescruiser\lib\sqlite\sqlite3.c(11938) : {4754} normal block at 0x01BFC460, 48 bytes

Re: [sqlite] Writing an image to the database as a BLOB

2008-08-29 Thread David Bicking
Have you confirmed that the pBuffer that would read out is byte for byte the same as the bmBytes that you used to insert in to the database? If they are the same, then sqlite did its job (or rather you called it correctly...), and the trouble is somewhere else. David On Fri, 2008-08-29 at 14:13