Re: [sqlite] Create DB file and then Create Table - Table FAILS.

2011-05-31 Thread Don Ireland
Ooh. I don't know what happened to that message it was sent as paragraphs. It's kinda hard to read now. Don Ireland -Original Message- From: Don Ireland To: SQLite Sent: Tue, 31 May 2011 10:18 PM Subject: [sqlite] Create DB file and

[sqlite] Create DB file and then Create Table - Table FAILS.

2011-05-31 Thread Don Ireland
I'm hoping someone can help me with this. Using Visual Studio C++, the following code DOES create the DB file. But the table doesn't get created and I'm stumped as to why it won't create the table. SQLiteConnection conn; conn.ConnectionString = "Data

Re: [sqlite] Bug in sqlite3_bind_parameter_name

2011-05-31 Thread Nico Williams
You could set a flag nothing that parameters have been optimized out, so the statement author can be warned. Where to encode the flag? Maybe in some opcode's unused parameter? Nico -- ___ sqlite-users mailing list sqlite-users@sqlite.org

Re: [sqlite] Bug in sqlite3_bind_parameter_name

2011-05-31 Thread Richard Hipp
On Tue, May 31, 2011 at 8:31 PM, Roger Binns wrote: > -BEGIN PGP SIGNED MESSAGE- > Hash: SHA1 > > On 05/31/2011 05:00 AM, Richard Hipp wrote: > > Any parameter that is optimized out > > becomes an anonymous parameter for which sqlite3_bind_parameter_name > returns

Re: [sqlite] Bug in sqlite3_bind_parameter_name

2011-05-31 Thread Roger Binns
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 05/31/2011 05:00 AM, Richard Hipp wrote: > Any parameter that is optimized out > becomes an anonymous parameter for which sqlite3_bind_parameter_name returns > NULL. This is extremely annoying behaviour, unexpected and non-obvious. The developer

Re: [sqlite] What is so slow on dropping tables?

2011-05-31 Thread Simon Slavin
On 31 May 2011, at 10:44pm, Nico Williams wrote: > You could rename the table and then delete from ... order by rowid asc > limit 1000, to delete 1000 rows at a time. Add in incremental > autovacuum and that might do the trick. Would DELETE FROM myTable ORDER BY rowid DESC LIMIT 1 be any

[sqlite] FTS4 reserved characters

2011-05-31 Thread Mohd Radzi Ibrahim
Hi, I was searching for any reference to reserved characters used in FTS4, but failed to find any. I have problem with query with - ftstable match 'width 5" ' But it's ok with - ftstable match 'width 5' to fix this, I replaces every double-qoute in query with empty space. My question, is

Re: [sqlite] What is so slow on dropping tables?

2011-05-31 Thread Nico Williams
On Tue, May 31, 2011 at 4:22 PM, Simon Slavin wrote: > Split the DROP into two stages: > > DELETE FROM myTable; > DROP TABLE myTable; > > Which one takes all the time ?  If it's the second one, then perhaps just > delete all the records.  Filling the table back up again

Re: [sqlite] What is so slow on dropping tables?

2011-05-31 Thread Simon Slavin
On 31 May 2011, at 8:18pm, Jan Hudec wrote: > At $work we have an application that processes *huge* (tens of millions of > rows in some of the larger tables, sometimes over 30GiB file size). This > application changes and when it does, it drops some tables and calculates > them again. What is

Re: [sqlite] Bug in sqlite3_bind_parameter_name

2011-05-31 Thread Patrick Earl
I just had an amusing realization... if SQLite itself won't change, then the problem falls on the shoulders of System.Data.SQLite, which is incidentally also handled by this mailing list. It's ultimately this code that is causing the problem because of the case mentioned here: private void

Re: [sqlite] Bug in sqlite3_bind_parameter_name

2011-05-31 Thread Patrick Earl
The generated limit parameter does have a value of 1, so it's a valid query. It's SQLite that has taken this valid query with a valid parameter value of 1 and has exposed its internal implementation details by removing it and causing additional work-arounds in parameter binding. It's possible

Re: [sqlite] What is so slow on dropping tables?

2011-05-31 Thread Jan Hudec
On Tue, May 31, 2011 at 12:30:59 -0700, Roger Binns wrote: > -BEGIN PGP SIGNED MESSAGE- > Hash: SHA1 > > On 05/31/2011 12:18 PM, Jan Hudec wrote: > > and calculates them again. > > Have you considered using virtual tables so that the calculations are done > on access as needed rather

Re: [sqlite] What is so slow on dropping tables?

2011-05-31 Thread Jan Hudec
On Tue, May 31, 2011 at 14:29:11 -0500, Nico Williams wrote: > Just a guess: finding all the pages to free requires traversing the > internal nodes of the table's b-tree, which requires reading a fair > subset of the table's b-tree, which might be a lot of I/O. At 150MB/s > it would take almost

Re: [sqlite] What is so slow on dropping tables?

2011-05-31 Thread Roger Binns
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 05/31/2011 12:18 PM, Jan Hudec wrote: > and calculates them again. Have you considered using virtual tables so that the calculations are done on access as needed rather than up front? Roger -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.11

Re: [sqlite] What is so slow on dropping tables?

2011-05-31 Thread Nico Williams
Just a guess: finding all the pages to free requires traversing the internal nodes of the table's b-tree, which requires reading a fair subset of the table's b-tree, which might be a lot of I/O. At 150MB/s it would take almost two minutes to read 15GB of b-tree pages from a single disk, and

[sqlite] What is so slow on dropping tables?

2011-05-31 Thread Jan Hudec
Hellow folks, At $work we have an application that processes *huge* (tens of millions of rows in some of the larger tables, sometimes over 30GiB file size). This application changes and when it does, it drops some tables and calculates them again. What is somewhat surprising is that dropping the

Re: [sqlite] Bug in sqlite3_bind_parameter_name

2011-05-31 Thread Jan Hudec
On Tue, May 31, 2011 at 08:00:40 -0400, Richard Hipp wrote: > On Mon, May 30, 2011 at 11:27 PM, Patrick Earl wrote: > > SELECT this_.studentId as studentId143_0_, > > this_.Name as Name143_0_, > > this_.address_city as address3_143_0_, > > this_.address_state as

Re: [sqlite] alter table add column

2011-05-31 Thread Simon Slavin
On 31 May 2011, at 5:09pm, Fabio Spadaro wrote: > Step 1: alter table pippo rename to fabio -> ok > step 2: insert into fabio (field1) values ​​('1 ') -> ko > OperationalError: no such table main.pippo How does step 2 know the name 'pippo' ? You don't seem to supply it in the command.

Re: [sqlite] alter table add column

2011-05-31 Thread Stephan Beal
On Tue, May 31, 2011 at 6:09 PM, Fabio Spadaro wrote: > To recap: > Step 1: alter table pippo rename to fabio -> ok > step 2: insert into fabio (field1) values ('1 ') -> ko > OperationalError: no such table main.pippo > Step 3: alter table add column fabio field2

Re: [sqlite] alter table add column

2011-05-31 Thread Fabio Spadaro
Hi 2011/5/31 Stephan Beal > On Tue, May 31, 2011 at 5:11 PM, Fabio Spadaro >wrote: > > > "Alter table add column" command drop data from table. > > Can you keep the data or should I store the data before the alter and > then > > put > > them in

Re: [sqlite] alter table add column

2011-05-31 Thread Stephan Beal
On Tue, May 31, 2011 at 5:11 PM, Fabio Spadaro wrote: > "Alter table add column" command drop data from table. > Can you keep the data or should I store the data before the alter and then > put > them in the table? > http://www.sqlite.org/lang_altertable.html says:

Re: [sqlite] alter table add column

2011-05-31 Thread Mr. Puneet Kishor
On May 31, 2011, at 10:11 AM, Fabio Spadaro wrote: > "Alter table add column" command drop data from table. > Can you keep the data or should I store the data before the alter and then put > them in the table? ALTER TABLE ADD COLUMN does not drop data from the table.

[sqlite] alter table add column

2011-05-31 Thread Fabio Spadaro
"Alter table add column" command drop data from table. Can you keep the data or should I store the data before the alter and then put them in the table? -- Fabio Spadaro www.fabiospadaro.com ___ sqlite-users mailing list sqlite-users@sqlite.org

Re: [sqlite] Bug in sqlite3_bind_parameter_name

2011-05-31 Thread Stephan Beal
On Tue, May 31, 2011 at 2:00 PM, Richard Hipp wrote: > The LIMIT in a scalar subquery is always ignored. A scalar subquery > operates with a LIMIT of 1 regardless of any LIMIT that you might specify. > That means the @p1 is optimized out - it does not appear in the generated >

Re: [sqlite] Cannot load SQLite.Interop.dll but file is in the folder

2011-05-31 Thread Christoph P.U. Kukulies
Am 31.05.2011 14:54, schrieb Black, Michael (IS): > Unfortunately you're also hitting a rather lousy error message which doesn't > tell you "file not found" or "permission denied" or such..for which I always > deduct points for my students. > > > > So...try this.. > >

Re: [sqlite] Cannot load SQLite.Interop.dll but file is in the folder

2011-05-31 Thread Black, Michael (IS)
Unfortunately you're also hitting a rather lousy error message which doesn't tell you "file not found" or "permission denied" or such..for which I always deduct points for my students. So...try this..

Re: [sqlite] Encoding Question

2011-05-31 Thread Brian Pears
Christian Schwarz wrote: >This is base64. Christian Many thanks - I've not come across this before, but there's enough in the Wikipedia article to enable me to write a little vb script to convert the base64 to text. Brian -- Brian Pears (Gateshead)

Re: [sqlite] Encoding Question

2011-05-31 Thread Christian Schwarz
This is base64. Christian ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

[sqlite] Encoding Question

2011-05-31 Thread Brian Pears
As you will gather I am very new to SQLite and indeed to databases in general, so please bear with me. I am using the Singular SQLiteExplorer 3.04 to examine a Rootsmagic database. When I display a particular table, right click on a particular blob cell in the "Fields" column and select

Re: [sqlite] Bug in sqlite3_bind_parameter_name

2011-05-31 Thread Richard Hipp
On Mon, May 30, 2011 at 11:27 PM, Patrick Earl wrote: > Greetings! > > I have the following query: > > SELECT this_.studentId as studentId143_0_, this_.Name as Name143_0_, > this_.address_city as address3_143_0_, this_.address_state as > address4_143_0_,

Re: [sqlite] [BUG] Silent change in intergeral overflow handling in 3.7.6

2011-05-31 Thread Jan Hudec
Richard Hipp writes: > > On Wed, May 25, 2011 at 4:40 AM, Jan Hudec wrote: > > > I need condition > > > >object_id = side_id & ~(1 << 63) > > > > but that's not valid syntax. > > > > Yeah it is. Try, for example: > > SELECT 1234 & ~(1<<63); > SELECT (-1234)

Re: [sqlite] R*-Tree limit

2011-05-31 Thread Kirell Benzi
Thanks On Sat, May 28, 2011 at 20:09, Richard Hipp wrote: > On Fri, May 27, 2011 at 7:59 AM, Kirell Benzi >wrote: > > > Hello, > > > > I would like to use the R*-Tree for a big number of columns, let's say > 50. > > However I read in the doc that it