Re: [sqlite] How do I know the python functions registered on SQLite ?

2014-05-09 Thread big stone
Hi,

Thanks Rogers !
Danke Hick !

I'll do my manual housekeeping, so.

Cheers,
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] duplicate row in sqlite3 database

2014-05-09 Thread Drago, William @ MWG - NARDAEAST
> -Original Message-
> From: sqlite-users-boun...@sqlite.org [mailto:sqlite-users-
> boun...@sqlite.org] On Behalf Of RSmith
> Sent: Friday, May 09, 2014 2:01 PM
> To: sqlite-users@sqlite.org
> Subject: Re: [sqlite] duplicate row in sqlite3 database
>
> That sounds NOTHING like a violation error... it seems a lot more like
> the intermediate thing failed on communicating, but I am not familiar
> with it (I hope another poster might have advice) - unless it simply
> does not understand the serialized output. Either way it doesn't feel
> right to me.

It only happens when I try it insert a duplicate row, otherwise things are 
working very well. It doesn't feel right to me either, but this is not unusual 
for VEE. VEE is a large interpreted environment. There is so much going on 
between the user and the cpu that error codes are sometimes obfuscated to the 
point that you see here. I just have to assume that an error on INSERT is due 
to a duplicate row. There's nothing else I can do.

>
>
> On 2014/05/09 19:52, Drago, William @ MWG - NARDAEAST wrote:
> > When I deliberately try to insert a duplicate row I get the following
> error from my VEE* environment:
> >
> > Execution of method ExecuteNonQuery in the referenced .NET object or
> type failed.
> > Exception type: System.Runtime.Serialization.SerializationException
> > Type is not resolved for member 'System.Data.SQLiteException,
> System.Data.Sqlite, Version=1.0.92...'
> >
> > If that sounds like a duplicate row error, I'll trap it and display a
> message to the user.
> >
> > -Bill
> >
> > *About VEE:
> > http://cp.literature.agilent.com/litweb/pdf/5990-9117EN.pdf
> >
> >
>
> ___
> sqlite-users mailing list
> sqlite-users@sqlite.org
> http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
CONFIDENTIALITY, EXPORT CONTROL AND DISCLAIMER NOTE:This e-mail and any 
attachments are solely for the use of the addressee and may contain information 
that is privileged or confidential. Any disclosure, use or distribution of the 
information contained herein is prohibited. In the event this e-mail contains 
technical data within the definition of the International Traffic in Arms 
Regulations or Export Administration Regulations, it is subject to the export 
control laws of the U.S.Government. The recipient should check this e-mail and 
any attachments for the presence of viruses as L-3 does not accept any 
liability associated with the transmission of this e-mail. If you have received 
this communication in error, please notify the sender by reply e-mail and 
immediately delete this message and any attachments.
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] duplicate row in sqlite3 database

2014-05-09 Thread RSmith
That sounds NOTHING like a violation error... it seems a lot more like the intermediate thing failed on communicating, but I am not 
familiar with it (I hope another poster might have advice) - unless it simply does not understand the serialized output. Either way 
it doesn't feel right to me.



On 2014/05/09 19:52, Drago, William @ MWG - NARDAEAST wrote:

When I deliberately try to insert a duplicate row I get the following error 
from my VEE* environment:

Execution of method ExecuteNonQuery in the referenced .NET object or type 
failed.
Exception type: System.Runtime.Serialization.SerializationException
Type is not resolved for member 'System.Data.SQLiteException, 
System.Data.Sqlite, Version=1.0.92...'

If that sounds like a duplicate row error, I'll trap it and display a message 
to the user.

-Bill

*About VEE: http://cp.literature.agilent.com/litweb/pdf/5990-9117EN.pdf




___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] duplicate row in sqlite3 database

2014-05-09 Thread Drago, William @ MWG - NARDAEAST
When I deliberately try to insert a duplicate row I get the following error 
from my VEE* environment:

Execution of method ExecuteNonQuery in the referenced .NET object or type 
failed.
Exception type: System.Runtime.Serialization.SerializationException
Type is not resolved for member 'System.Data.SQLiteException, 
System.Data.Sqlite, Version=1.0.92...'

If that sounds like a duplicate row error, I'll trap it and display a message 
to the user.

-Bill

*About VEE: http://cp.literature.agilent.com/litweb/pdf/5990-9117EN.pdf


> -Original Message-
> From: sqlite-users-boun...@sqlite.org [mailto:sqlite-users-
> boun...@sqlite.org] On Behalf Of RSmith
> Sent: Friday, May 09, 2014 12:06 PM
> To: General Discussion of SQLite Database
> Subject: Re: [sqlite] duplicate row in sqlite3 database
>
>
> On 2014/05/09 17:58, Drago, William @ MWG - NARDAEAST wrote:
> >> -Original Message-
> >> From: sqlite-users-boun...@sqlite.org [mailto:sqlite-users-
> >> boun...@sqlite.org] On Behalf Of Igor Tandetnik
> >> Sent: Thursday, May 08, 2014 9:48 AM
> >> To: sqlite-users@sqlite.org
> >> Subject: Re: [sqlite] duplicate row in sqlite3 database
> >>
> >> On 5/8/2014 5:14 AM, techi eth wrote:
> >>> SQlite3 have any method where it can avoid adding duplicate row or
> >>> throwing error status code on duplication.,
> >> Define a UNIQUE constraint or a unique index on those columns you
> >> don't want duplicated. Then an attempt to insert a duplicate row
> >> would result in an error.
> > An error as in program crash or an error code?
> >
> >
> A returned error code which you can use to look up the meaning of
> (there are many possible things that might cause an error). If the
> meaning turns out to be a failed constraint, then you know why the
> Insert did not complete.
>
> If you do not particularly care for specifically the constraint
> failure, but just want the row inserted if it does not violate the
> constraint, then one of two ways can be used, defining an ON CONFLICT
> clause in the schema or more generally used, the SQL syntax "INSERT OR
> IGNORE INTO xxx... " which is much the same as INSERT with an ON
> CONFLICT IGNORE clause... details of all this can be found on the
> conflict docs in the sqlite.org site.
>
> http://www.sqlite.org/conflict.html
> http://www.sqlite.org/lang_conflict.html
> http://www.sqlite.org/lang_insert.html
>
> ___
> sqlite-users mailing list
> sqlite-users@sqlite.org
> http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
CONFIDENTIALITY, EXPORT CONTROL AND DISCLAIMER NOTE:This e-mail and any 
attachments are solely for the use of the addressee and may contain information 
that is privileged or confidential. Any disclosure, use or distribution of the 
information contained herein is prohibited. In the event this e-mail contains 
technical data within the definition of the International Traffic in Arms 
Regulations or Export Administration Regulations, it is subject to the export 
control laws of the U.S.Government. The recipient should check this e-mail and 
any attachments for the presence of viruses as L-3 does not accept any 
liability associated with the transmission of this e-mail. If you have received 
this communication in error, please notify the sender by reply e-mail and 
immediately delete this message and any attachments.
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] Foreign Key errors

2014-05-09 Thread phaworth
After looking into error messages further, I see that the constraint name is
not included in NOT NULL or UNIQUE constraint errors although it is there in
CHECK constraint errors.  The table.column that caused the error is in the
messages so it is possible to identify which column caused the error.  I'm
guessing the constraint name is there for CHECK errors because there can be
more than one of them for a column so the column name doesn't uniquely
identify which check failed.

Since constraint names don't seem to turn up anywhere except CHECK
constraint errors, is there any point in defining them?

Pete



--
View this message in context: 
http://sqlite.1065341.n5.nabble.com/Foreign-Key-errors-tp75473p75602.html
Sent from the SQLite mailing list archive at Nabble.com.
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] Compiling System.Data.SQLite for .NET CF 3.5 (VS2008 & WinCE 6) on x86

2014-05-09 Thread Joe Mistachkin

Eric Johnston wrote:
>
> The question is: How do I compile System.Data.SQLite for .NET CF 3.5
(VS2008)
> with a target platform of x86 for the SQLite.Interop.092.dll? 
>

The Windows CE 6.x SDKs that I've seen do not include support for the x86
platform.  Are you aware of one that does?

--
Joe Mistachkin

___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


[sqlite] Spellfix Implementation

2014-05-09 Thread JocOnat
I'm using the extension module spellfix module to order tables 
via levenstein. 

I compiled spellfix.c (it's inside /ext/misc/) using MinGW for Windows: 

gcc -g -shared spellfix.c -o spellfix.dll

It compiles successfuly but when i load it into the command line shell of
sqlite: 

sqlite> .load ./spellfix 

I'm getting this error: 

Error: %1 is not a valid win32 application

I really have very few knowledge about compiling c programs. Did i do some 
mistake about compiling or something else is happened?



--
View this message in context: 
http://sqlite.1065341.n5.nabble.com/Spellfix-Implementation-tp75596.html
Sent from the SQLite mailing list archive at Nabble.com.
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] Spellfix Implementation

2014-05-09 Thread Richard Hipp
On Fri, May 9, 2014 at 11:31 AM, JocOnat  wrote:

> I'm using the extension module spellfix module to order tables
> via levenstein.
>
> I compiled spellfix.c (it's inside /ext/misc/) using MinGW for Windows:
>
> gcc -g -shared spellfix.c -o spellfix.dll
>

I had to add "-I." to get gcc to pick up the sqlite3ext.h file from the
working directory...


>
> It compiles successfuly but when i load it into the command line shell of
> sqlite:
>
> sqlite> .load ./spellfix
>

Then the above works fine for me.



>
> I'm getting this error:
>
> Error: %1 is not a valid win32 application
>
> I really have very few knowledge about compiling c programs. Did i do some
> mistake about compiling or something else is happened?
>
>
>
> --
> View this message in context:
> http://sqlite.1065341.n5.nabble.com/Spellfix-Implementation-tp75596.html
> Sent from the SQLite mailing list archive at Nabble.com.
> ___
> sqlite-users mailing list
> sqlite-users@sqlite.org
> http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
>



-- 
D. Richard Hipp
d...@sqlite.org
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] duplicate row in sqlite3 database

2014-05-09 Thread RSmith


On 2014/05/09 17:58, Drago, William @ MWG - NARDAEAST wrote:

-Original Message-
From: sqlite-users-boun...@sqlite.org [mailto:sqlite-users-
boun...@sqlite.org] On Behalf Of Igor Tandetnik
Sent: Thursday, May 08, 2014 9:48 AM
To: sqlite-users@sqlite.org
Subject: Re: [sqlite] duplicate row in sqlite3 database

On 5/8/2014 5:14 AM, techi eth wrote:

SQlite3 have any method where it can avoid adding duplicate row or
throwing error status code on duplication.,

Define a UNIQUE constraint or a unique index on those columns you don't
want duplicated. Then an attempt to insert a duplicate row would result
in an error.

An error as in program crash or an error code?


A returned error code which you can use to look up the meaning of (there are many possible things that might cause an error). If the 
meaning turns out to be a failed constraint, then you know why the Insert did not complete.


If you do not particularly care for specifically the constraint failure, but just want the row inserted if it does not violate the 
constraint, then one of two ways can be used, defining an ON CONFLICT clause in the schema or more generally used, the SQL syntax 
"INSERT OR IGNORE INTO xxx... " which is much the same as INSERT with an ON CONFLICT IGNORE clause... details of all this can be 
found on the conflict docs in the sqlite.org site.


http://www.sqlite.org/conflict.html
http://www.sqlite.org/lang_conflict.html
http://www.sqlite.org/lang_insert.html

___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] duplicate row in sqlite3 database

2014-05-09 Thread Drago, William @ MWG - NARDAEAST
> -Original Message-
> From: sqlite-users-boun...@sqlite.org [mailto:sqlite-users-
> boun...@sqlite.org] On Behalf Of Igor Tandetnik
> Sent: Thursday, May 08, 2014 9:48 AM
> To: sqlite-users@sqlite.org
> Subject: Re: [sqlite] duplicate row in sqlite3 database
>
> On 5/8/2014 5:14 AM, techi eth wrote:
> > SQlite3 have any method where it can avoid adding duplicate row or
> > throwing error status code on duplication.,
>
> Define a UNIQUE constraint or a unique index on those columns you don't
> want duplicated. Then an attempt to insert a duplicate row would result
> in an error.

An error as in program crash or an error code?

> --
> Igor Tandetnik
>
> ___
> sqlite-users mailing list
> sqlite-users@sqlite.org
> http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
CONFIDENTIALITY, EXPORT CONTROL AND DISCLAIMER NOTE:This e-mail and any 
attachments are solely for the use of the addressee and may contain information 
that is privileged or confidential. Any disclosure, use or distribution of the 
information contained herein is prohibited. In the event this e-mail contains 
technical data within the definition of the International Traffic in Arms 
Regulations or Export Administration Regulations, it is subject to the export 
control laws of the U.S.Government. The recipient should check this e-mail and 
any attachments for the presence of viruses as L-3 does not accept any 
liability associated with the transmission of this e-mail. If you have received 
this communication in error, please notify the sender by reply e-mail and 
immediately delete this message and any attachments.
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] System.Data.SQLite on Windows CE x86 with .NET3.5

2014-05-09 Thread Eric Johnston
It must have been, considering other software running on these WinCE 6 devices 
I have are using an older version of SQLite. They're not using .NET CF, though.

I can't find an ftp archive (or any archive) of older versions of the 
System.Data.SQLite libraries. Have you found one, by any chance?
--
Eric

-Original Message-
From: sqlite-users-boun...@sqlite.org [mailto:sqlite-users-boun...@sqlite.org] 
On Behalf Of Mattias Kindborg
Sent: 9 May, 2014 06:03
To: General Discussion of SQLite Database
Subject: Re: [sqlite] System.Data.SQLite on Windows CE x86 with .NET3.5

Hi Eric.

Then I guess it was a conscious decision to drop support for x86 with .NET CF 
3.5, becuse I think it has been supported in olver versions of SQLite?

Best regards,
Mattias


From:   Eric Johnston 
To: General Discussion of SQLite Database 
Date:   2014-05-09 14:43
Subject:Re: [sqlite] System.Data.SQLite on Windows CE x86 with 
.NET3.5
Sent by:sqlite-users-boun...@sqlite.org



Among the binaries all I see is for .NET Compact Framework 3.9 (the latest from 
Microsoft, but not supported prior to their collection of operating systems 
that were released last year, so it doesn't work with WinCE 6).

I have compiled for ARM with .NET CF 3.5 in VS2008, but not x86.
--
Eric

> On May 9, 2014, at 1:02 AM, "Mattias Kindborg" 
 wrote:
> 
> Doesn't SQLite have support for Windows CE x86 with .NET3.5? On the 
> download site for System.Data.SQLite (
> http://system.data.sqlite.org/index.html/doc/trunk/www/downloads.wiki)
it 
> seems that only ARM is supported.
> 
> Best regards,
> Mattias Kindborg
> ___
> sqlite-users mailing list
> sqlite-users@sqlite.org
> http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] 64 bits Dll

2014-05-09 Thread Constantine Yannakopoulos
On Fri, May 9, 2014 at 5:56 PM, Carlos Ferreira wrote:

> Constantine, really useful information.
>
> Do you know if the compiled objs that may be available in Delphi are
> comparable in performance with the ones made by MS VS.
>

​No, sorry.​


I know there is a tool, IMPLIB to import dlls or libs that can be from
> Microsoft and create Libs to use in Delphi..Not sure how they did it in
> Embarcadero..
>

​I am not sure either​ but I think that the 64 bit compiler links ELF
object files. The 32 bit compiler links OMF object files and I believe that
they used their own C compiler (from CBuilder) to produce them. One also
has to reimplement some C runtime functions like malloc, free, etc. in
Delphi for the linker to find. It is not an easy task so I would recommend
linking to the dll.

See also this:
http://docwiki.embarcadero.com/RADStudio/XE6/en/Differences_Between_Clang-based_C%2B%2B_Compilers_and_Previous-Generation_C%2B%2B_Compilers

--Constantine
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] 64 bits Dll

2014-05-09 Thread Bogdan Ureche
You can also use SQLite.Interop.dll as a replacement SQLite library with
encryption support. It is part of the System.Data.SQLite distribution and
both 32 bit and 64 bit are included.

Bogdan


On Fri, May 9, 2014 at 9:56 AM, Carlos Ferreira wrote:

> Constantine, really useful information.
>
> Do you know if the compiled objs that may be available in Delphi are
> comparable in performance with the ones made by MS VS.
>
> I know there is a tool, IMPLIB to import dlls or libs that can be from
> Microsoft and create Libs to use in Delphi..Not sure how they did it in
> Embarcadero..
>
> Thanks
>
> Carlos
>
>
> -Original Message-
> From: sqlite-users-boun...@sqlite.org [mailto:
> sqlite-users-boun...@sqlite.org] On Behalf Of Constantine Yannakopoulos
> Sent: sexta-feira, 9 de Maio de 2014 15:36
> To: General Discussion of SQLite Database
> Subject: Re: [sqlite] 64 bits Dll
>
> On Fri, May 9, 2014 at 5:20 PM, Ralf Junker  wrote:
>
> > FireDAC only, and outdated by 2 months at the day of release. Delphi
> > XE5 SQLite is still at 3.7.17, almost one year behind.
> >
>
> ​In Delphi XE5 FireDAC either links statically the object files ​
> ​sqlite3_x86.obj ​/​sqlite3_x64.obj or loads sqlite3.dll and links to its
> functions via
> GetProcAddress() depending to the compiler switch FireDAC_SQLITE_STATIC.
> So it should be possible to recompile the units FireDAC.Phys.SQLiteXXX.pas
> and either link in any later version of the sqlite3 object files or have it
> load the latest dll, provided that you have $(BDS)\source\data\firedac in
> your search path.
>
> --Constantine
> ___
> sqlite-users mailing list
> sqlite-users@sqlite.org
> http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
>
> ___
> sqlite-users mailing list
> sqlite-users@sqlite.org
> http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
>
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] 64 bits Dll

2014-05-09 Thread Carlos Ferreira
Constantine, really useful information.

Do you know if the compiled objs that may be available in Delphi are comparable 
in performance with the ones made by MS VS.

I know there is a tool, IMPLIB to import dlls or libs that can be from 
Microsoft and create Libs to use in Delphi..Not sure how they did it in 
Embarcadero..

Thanks

Carlos


-Original Message-
From: sqlite-users-boun...@sqlite.org [mailto:sqlite-users-boun...@sqlite.org] 
On Behalf Of Constantine Yannakopoulos
Sent: sexta-feira, 9 de Maio de 2014 15:36
To: General Discussion of SQLite Database
Subject: Re: [sqlite] 64 bits Dll

On Fri, May 9, 2014 at 5:20 PM, Ralf Junker  wrote:

> FireDAC only, and outdated by 2 months at the day of release. Delphi 
> XE5 SQLite is still at 3.7.17, almost one year behind.
>

​In Delphi XE5 FireDAC either links statically the object files ​ 
​sqlite3_x86.obj ​/​sqlite3_x64.obj or loads sqlite3.dll and links to its 
functions via
GetProcAddress() depending to the compiler switch FireDAC_SQLITE_STATIC. So it 
should be possible to recompile the units FireDAC.Phys.SQLiteXXX.pas and either 
link in any later version of the sqlite3 object files or have it load the 
latest dll, provided that you have $(BDS)\source\data\firedac in your search 
path.

--Constantine
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] 64 bits Dll

2014-05-09 Thread Carlos Ferreira
Ralf,

Thanks for the insigth.

Regards.

Carlos

-Original Message-
From: sqlite-users-boun...@sqlite.org
[mailto:sqlite-users-boun...@sqlite.org] On Behalf Of Ralf Junker
Sent: sexta-feira, 9 de Maio de 2014 15:20
To: General Discussion of SQLite Database
Subject: Re: [sqlite] 64 bits Dll

On 09.05.2014 13:50, Carlos Ferreira wrote:

> XE6 itself seems to native have access to both...

FireDAC only, and outdated by 2 months at the day of release. Delphi XE5
SQLite is still at 3.7.17, almost one year behind.

DISQLite3 has always been up to date for years and Delphi versions back to
Delphi 4:

   http://yunqa.de/delphi/doku.php/products/sqlite3/index

Ralf
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] 64 bits Dll

2014-05-09 Thread Carlos Ferreira
Thanks for the reply.


I am doing very simple raw table inserts of big blobs, and also blob
incremental reading..

I am barely using the sqlite query system itself in this particular
performance bottleneck.

Thanks to a friend of this community, Constantine, I was able to get the
latest 32 and 64 bits, and it works perfectly.

Regards.

Carlos

-Original Message-
From: sqlite-users-boun...@sqlite.org
[mailto:sqlite-users-boun...@sqlite.org] On Behalf Of RSmith
Sent: sexta-feira, 9 de Maio de 2014 14:57
To: sqlite-users@sqlite.org
Subject: Re: [sqlite] 64 bits Dll


On 2014/05/09 12:36, Carlos Ferreira wrote:
> I am using a win32 DLL built "sqlite-dll-win32-x86-3071700" . the DLL 
> is from 20-5-2013.
>
>
> I am using it with Delphi, and it works fine for what I need.
>
>
> I need however a 64 bits version of the DLL. I actually have the64 
> bits
> 3.7.16 version that I downloaded from the SYNOPSE project from Arnaud 
> Bouchez
> (http://blog.synopse.info/post/2013/03/23/Latest-version-of-sqlite3.dl
> l-for- Windows-64-bit ). It is a great work and a very nice library.
>
>   
>
> However in my particular project, I write and load blobs, mainly, and 
> this version is twice as slow as the 3.7.17 I am using in 32 bits.

As others have already mentioned where to obtain the 64-bit DLLs etc, let me
just add that almost every later SQLite is faster than previous versions
(usually at the cost of using a little extra memory) so if you are
experiencing a regression in performance, it is very likely that the actual
DB or query is not optimised - I would start looking there, not at the
"version".

There have been quite a few cases where an un-analyzed 3.7 query executed a
bit faster than a 3.8 query simply because it chose the better execution
plan by sheer luck... the newest version is better at that but it might help
running the "ANALYZE" sql command on your data table or rethinking your
Indices.

Put the Schema and Query here, we might be able to spot you a possible
optimization.


___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] 64 bits Dll

2014-05-09 Thread RSmith


On 2014/05/09 16:20, Ralf Junker wrote:

On 09.05.2014 13:50, Carlos Ferreira wrote:


XE6 itself seems to native have access to both...


FireDAC only, and outdated by 2 months at the day of release. Delphi XE5 SQLite 
is still at 3.7.17, almost one year behind.


Very true - the one disadvantage of not being a client-server based system is that any upgrades in a normal C-S DB system can happen 
server side without affecting how the clients connect, which in turn gets updated only typically on major versions. With SQLite, the 
DB is either embedded or connected directly to the executing system, which means if you use libraries (DLLs etc) you can upgrade 
those separate from the application, but if you link in compiled libraries into used componentry etc you are stuck with whatever 
version you compiled it with (Such as FireDAC).


Note that you can very much just drop any SQlite DLL in Delphi's bin folder and add the reference to the DB explorer, it will work 
fine, as I use it regularly for quick viewing purposes (you can just google the details for this or mail me direct since it will 
bore the list) - BUT deploying an app that was made using this method is finicky and plain silly - and that's why they don't add it 
natively, and that's why FireDAC compiles it into the components.


Personally I prefer using a dedicated connection thing for actual DB comms to which I have insight into the code etc. and which 
connects to a DLL which I can upgrade my side or user-side at any point. For this, DISQLite3 is a fine example.



___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] 64 bits Dll

2014-05-09 Thread Constantine Yannakopoulos
On Fri, May 9, 2014 at 5:20 PM, Ralf Junker  wrote:

> FireDAC only, and outdated by 2 months at the day of release. Delphi XE5
> SQLite is still at 3.7.17, almost one year behind.
>

​In Delphi XE5 FireDAC either links statically the object files ​
​sqlite3_x86.obj
​/​sqlite3_x64.obj or loads sqlite3.dll and links to its functions via
GetProcAddress() depending to the compiler switch FireDAC_SQLITE_STATIC. So
it should be possible to recompile the units FireDAC.Phys.SQLiteXXX.pas and
either link in any later version of the sqlite3 object files or have it
load the latest dll, provided that you have $(BDS)\source\data\firedac in
your search path.

--Constantine
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] 64 bits Dll

2014-05-09 Thread Ralf Junker

On 09.05.2014 13:50, Carlos Ferreira wrote:


XE6 itself seems to native have access to both...


FireDAC only, and outdated by 2 months at the day of release. Delphi XE5 
SQLite is still at 3.7.17, almost one year behind.


DISQLite3 has always been up to date for years and Delphi versions back 
to Delphi 4:


  http://yunqa.de/delphi/doku.php/products/sqlite3/index

Ralf
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] General error: 11 malformed database schema - near "'NOCASE'":

2014-05-09 Thread RSmith


On 2014/05/09 13:43, Kleiner Werner wrote:

Hello
I have a strange problem.
On my Windows 7 XAMPP there is a little web application.
The PHP connection to SQLite DB (3.3.7) is made with PDO.
On Windows all is fine.

Now I copied complete project to a Web Hoster.
if I want to call my start page I get the error:

General error: 11 malformed database schema - near "'NOCASE'":

The table has some columns which are declared as NOCASE
I have no idea why the SQLite db works fine on Windows but not on the WebSpace? 
(because it is Linux?)


Mainly, the only reason why SQLite would work any differently between one platform and the next is that it is using a different 
version of the library. What version does the web app use? (Though I cant imagine it being even older than 3.3.7 which is 
prehistoric by any measure - though it very definitely supported NOCASE).


Try opening another DBFile that doesn't exist yet or at any rate does not complain about the schema problem, and get the version 
from it ("SELECT sqlite_version()" should work)


Also, post the entire schema here, maybe it contains a quirk that did not 
matter in one version and then did in another...

___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] 64 bits Dll

2014-05-09 Thread RSmith


On 2014/05/09 12:36, Carlos Ferreira wrote:

I am using a win32 DLL built "sqlite-dll-win32-x86-3071700" . the DLL is
from 20-5-2013.


I am using it with Delphi, and it works fine for what I need.


I need however a 64 bits version of the DLL. I actually have the64 bits
3.7.16 version that I downloaded from the SYNOPSE project from Arnaud
Bouchez
(http://blog.synopse.info/post/2013/03/23/Latest-version-of-sqlite3.dll-for-
Windows-64-bit ). It is a great work and a very nice library.

  


However in my particular project, I write and load blobs, mainly, and this
version is twice as slow as the 3.7.17 I am using in 32 bits.


As others have already mentioned where to obtain the 64-bit DLLs etc, let me just add that almost every later SQLite is faster than 
previous versions (usually at the cost of using a little extra memory) so if you are experiencing a regression in performance, it is 
very likely that the actual DB or query is not optimised - I would start looking there, not at the "version".


There have been quite a few cases where an un-analyzed 3.7 query executed a bit faster than a 3.8 query simply because it chose the 
better execution plan by sheer luck... the newest version is better at that but it might help running the "ANALYZE" sql command on 
your data table or rethinking your Indices.


Put the Schema and Query here, we might be able to spot you a possible 
optimization.


___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] System.Data.SQLite on Windows CE x86 with .NET3.5

2014-05-09 Thread Mattias Kindborg
Hi Eric.

Then I guess it was a conscious decision to drop support for x86 with .NET 
CF 3.5, becuse I think it has been supported in olver versions of SQLite?

Best regards,
Mattias


From:   Eric Johnston 
To: General Discussion of SQLite Database 
Date:   2014-05-09 14:43
Subject:Re: [sqlite] System.Data.SQLite on Windows CE x86 with 
.NET3.5
Sent by:sqlite-users-boun...@sqlite.org



Among the binaries all I see is for .NET Compact Framework 3.9 (the latest 
from Microsoft, but not supported prior to their collection of operating 
systems that were released last year, so it doesn't work with WinCE 6).

I have compiled for ARM with .NET CF 3.5 in VS2008, but not x86.
--
Eric

> On May 9, 2014, at 1:02 AM, "Mattias Kindborg" 
 wrote:
> 
> Doesn't SQLite have support for Windows CE x86 with .NET3.5? On the 
> download site for System.Data.SQLite (
> http://system.data.sqlite.org/index.html/doc/trunk/www/downloads.wiki) 
it 
> seems that only ARM is supported.
> 
> Best regards,
> Mattias Kindborg
> ___
> sqlite-users mailing list
> sqlite-users@sqlite.org
> http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] System.Data.SQLite on Windows CE x86 with .NET3.5

2014-05-09 Thread Eric Johnston
Among the binaries all I see is for .NET Compact Framework 3.9 (the latest from 
Microsoft, but not supported prior to their collection of operating systems 
that were released last year, so it doesn't work with WinCE 6).

I have compiled for ARM with .NET CF 3.5 in VS2008, but not x86.
--
Eric

> On May 9, 2014, at 1:02 AM, "Mattias Kindborg" 
>  wrote:
> 
> Doesn't SQLite have support for Windows CE x86 with .NET3.5? On the 
> download site for System.Data.SQLite (
> http://system.data.sqlite.org/index.html/doc/trunk/www/downloads.wiki) it 
> seems that only ARM is supported.
> 
> Best regards,
> Mattias Kindborg
> ___
> sqlite-users mailing list
> sqlite-users@sqlite.org
> http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] sqlite db transfer

2014-05-09 Thread Simon Slavin

On 9 May 2014, at 1:23pm, Sky Meena  wrote:

> i working in server client... c program. i need to transfer db from server
> to client. in udp socket .. i to send a db.

SQLite does not involve a server or a client.  All processing and access of the 
database is done inside your application.  It does not communicate over IP, or 
use a socket, or anything like that.

You can write your own server if you want, and many people have.  Or if all you 
want is to send an entire database, you can use any method which would send a 
text file from one computer to another.  For SQLite, if no program is accessing 
a database then the database is just one file.

Simon.
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] General error: 11 malformed database schema - near "'NOCASE'":

2014-05-09 Thread Simon Slavin

On 9 May 2014, at 1:16pm, Werner Kleiner  wrote:

> If I connect to this db with PHPLiteadmin it tells me "No Table in Database"
> But if I connect on Windows with e.g. Sqlitestudio all is fine.

I'm betting that you're not connecting to the same database file in all these 
methods.  See if you can get them to agree on what tables are in the database 
using

SELECT name FROM sqlite_master WHERE type='table' ORDER BY name

Simon.
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


[sqlite] sqlite db transfer

2014-05-09 Thread Sky Meena
i working in server client... c program. i need to transfer db from server
to client. in udp socket .. i to send a db.
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] WITHOUT ROWID option

2014-05-09 Thread Simon Slavin

On 9 May 2014, at 11:17am, Sky Meena  wrote:

> i need to transfer sqlite.db from server to client in udp socket

Please start a new thread about this.  It has nothing to do with 'WITHOUT ROWID 
option'.

Simon.
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] General error: 11 malformed database schema - near "'NOCASE'":

2014-05-09 Thread Werner Kleiner
Strange thing is: 
If I connect to this db with PHPLiteadmin it tells me "No Table in Database"
But if I connect on Windows with e.g. Sqlitestudio all is fine.

???



--
View this message in context: 
http://sqlite.1065341.n5.nabble.com/General-error-11-malformed-database-schema-near-NOCASE-tp75572p75579.html
Sent from the SQLite mailing list archive at Nabble.com.
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] General error: 11 malformed database schema - near "'NOCASE'":

2014-05-09 Thread Stephan Beal
On Fri, May 9, 2014 at 2:09 PM, Stephan Beal  wrote:

> On Fri, May 9, 2014 at 1:43 PM, Kleiner Werner  wrote:
>
>> The PHP connection to SQLite DB (3.3.7) is made with PDO.
>>
>
> It's not clear in the docs whether 3.3 has NOCASE. Perhaps it did not? 3.3
> is ancient.
>
> http://www.sqlite.org/releaselog/3_3_7.html
>

Nevermind: NOCASE appears in a changelog comment for 3.2.6:

http://www.sqlite.org/changes.html

-- 
- stephan beal
http://wanderinghorse.net/home/stephan/
http://gplus.to/sgbeal
"Freedom is sloppy. But since tyranny's the only guaranteed byproduct of
those who insist on a perfect world, freedom will have to do." -- Bigby Wolf
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] General error: 11 malformed database schema - near "'NOCASE'":

2014-05-09 Thread Stephan Beal
On Fri, May 9, 2014 at 1:43 PM, Kleiner Werner  wrote:

> The PHP connection to SQLite DB (3.3.7) is made with PDO.
>

It's not clear in the docs whether 3.3 has NOCASE. Perhaps it did not? 3.3
is ancient.

http://www.sqlite.org/releaselog/3_3_7.html

-- 
- stephan beal
http://wanderinghorse.net/home/stephan/
http://gplus.to/sgbeal
"Freedom is sloppy. But since tyranny's the only guaranteed byproduct of
those who insist on a perfect world, freedom will have to do." -- Bigby Wolf
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] 64 bits Dll

2014-05-09 Thread Constantine Yannakopoulos
On Fri, May 9, 2014 at 2:45 PM, Carlos Ferreira wrote:

> Tell me how you want to do this DLL exchange.


​I will send the compiled dlls to your personal email.​

--Constantine
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] 64 bits Dll

2014-05-09 Thread Carlos Ferreira
Ralf,

Thanks.

XE6 itself seems to native have access to both...I have to test this.



-Original Message-
From: sqlite-users-boun...@sqlite.org
[mailto:sqlite-users-boun...@sqlite.org] On Behalf Of Ralf Junker
Sent: sexta-feira, 9 de Maio de 2014 12:45
To: General Discussion of SQLite Database
Subject: Re: [sqlite] 64 bits Dll

On 09.05.2014 12:36, Carlos Ferreira wrote:

> I am using a win32 DLL built "sqlite-dll-win32-x86-3071700" . the DLL 
> is from 20-5-2013.
>
> I am using it with Delphi, and it works fine for what I need.
>
> I need however a 64 bits version of the DLL.

SQLite3 for Delphi, both Win32 and Win64, with many extensions and extras
here:

   http://yunqa.de/delphi/doku.php/products/sqlite3/index

Enjoy,

Ralf
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] 64 bits Dll

2014-05-09 Thread Carlos Ferreira
Constantine,

Thank you for your feedback.

If you could make the win32 and win64 DLLs available I would really thank you.

If for some reason it does not work as I expect, probably I can try the 
suggestion you made.

My only concern is that I need the compiled DLls and the Sqlite itself compiled 
to be as fast and optimized as possible.

Tell me how you want to do this DLL exchange.

Thanks

Carlos


-Original Message-
From: sqlite-users-boun...@sqlite.org [mailto:sqlite-users-boun...@sqlite.org] 
On Behalf Of Constantine Yannakopoulos
Sent: sexta-feira, 9 de Maio de 2014 11:57
To: General Discussion of SQLite Database
Subject: Re: [sqlite] 64 bits Dll

On Fri, May 9, 2014 at 1:36 PM, Carlos Ferreira wrote:

> Can anyone tell me where can I find the 64 bits version of Sqlite.dll, 
> or can anyone compile it for me? It would work as a small consulting project.
>

​I can send you dlls compiled from the latest amalgamation ​(3.8.4.3). If you 
need an older version ​I have a Visual Studio 2010 project ​that I use to 
compile the amalgamation for Windows 32 and 64 bit. If you have VS2010 I would 
be happy to send it to you. All you will need to do is to replace the 
amalgamation source files (.c and .h) and definition file (.def) with that of 
the previous version.
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] 64 bits Dll

2014-05-09 Thread Ralf Junker

On 09.05.2014 12:36, Carlos Ferreira wrote:


I am using a win32 DLL built "sqlite-dll-win32-x86-3071700" . the DLL is
from 20-5-2013.

I am using it with Delphi, and it works fine for what I need.

I need however a 64 bits version of the DLL.


SQLite3 for Delphi, both Win32 and Win64, with many extensions and 
extras here:


  http://yunqa.de/delphi/doku.php/products/sqlite3/index

Enjoy,

Ralf
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


[sqlite] General error: 11 malformed database schema - near "'NOCASE'":

2014-05-09 Thread Kleiner Werner
Hello
I have a strange problem.
On my Windows 7 XAMPP there is a little web application. 
The PHP connection to SQLite DB (3.3.7) is made with PDO.
On Windows all is fine.

Now I copied complete project to a Web Hoster. 
if I want to call my start page I get the error:

General error: 11 malformed database schema - near "'NOCASE'":

The table has some columns which are declared as NOCASE
I have no idea why the SQLite db works fine on Windows but not on the WebSpace? 
(because it is Linux?)

thanks for any idea?

best regards
Werner
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] 64 bits Dll

2014-05-09 Thread Constantine Yannakopoulos
On Fri, May 9, 2014 at 1:36 PM, Carlos Ferreira wrote:

> Can anyone tell me where can I find the 64 bits version of Sqlite.dll, or
> can anyone compile it for me? It would work as a small consulting project.
>

​I can send you dlls compiled from the latest amalgamation ​(3.8.4.3). If
you need an older version
​I have a Visual Studio 2010 project ​that I use to compile the
amalgamation for Windows 32 and 64 bit. If you have VS2010 I would be happy
to send it to you. All you will need to do is to replace the amalgamation
source files (.c and .h) and definition file (.def) with that of the
previous version.
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


[sqlite] 64 bits Dll

2014-05-09 Thread Carlos Ferreira
Hello,

 

 

I am using a win32 DLL built "sqlite-dll-win32-x86-3071700" . the DLL is
from 20-5-2013.

 

I am using it with Delphi, and it works fine for what I need.

 

I need however a 64 bits version of the DLL. I actually have the64 bits
3.7.16 version that I downloaded from the SYNOPSE project from Arnaud
Bouchez
(http://blog.synopse.info/post/2013/03/23/Latest-version-of-sqlite3.dll-for-
Windows-64-bit ). It is a great work and a very nice library.

 

However in my particular project, I write and load blobs, mainly, and this
version is twice as slow as the 3.7.17 I am using in 32 bits.

 

Can anyone tell me where can I find the 64 bits version of Sqlite.dll, or
can anyone compile it for me? It would work as a small consulting project.

 

I would prefer the DLL not to have the same name as the normal win32 DLL.for
instance sqlite3-64.dll

 

Regards and thanks to All.

 

Carlos

 

 

 

 

 

___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] WITHOUT ROWID option

2014-05-09 Thread Hick Gunter
Judging from the documentation there is not (optional methods may have a NULL 
pointer in the method table). Maybe this will/has change(d)

2.12 The xRowid Method
  int (*xRowid)(sqlite3_vtab_cursor *pCur, sqlite_int64 *pRowid);
A successful invocation of this method will cause *pRowid to be filled with the 
rowid of row that the virtual table cursor pCur is currently pointing at. This 
method returns SQLITE_OK on success. It returns an appropriate error code on 
failure.

The xRowid method is required for every virtual table implementation.


-Ursprüngliche Nachricht-
Von: Max Vlasov [mailto:max.vla...@gmail.com]
Gesendet: Freitag, 09. Mai 2014 12:10
An: General Discussion of SQLite Database
Betreff: Re: [sqlite] WITHOUT ROWID option

On Wed, May 7, 2014 at 6:31 PM, Richard Hipp  wrote:
> On Wed, May 7, 2014 at 9:00 AM, Marco Bambini  wrote:
>
>> What is the best way to know if a table has been created with the
>> WITHOUT ROWID option?
>>
>
>
> (1) You could send "SELECT rowid FROM table" 
>
> (2) Run both "PRAGMA index_list(table)" 
>
>

Is there a way for a virtual table implementation to report that there's no 
rowid support before first xRowId call takes place?

Max
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


---
Gunter Hick
Software Engineer

Scientific Games International GmbH
Klitschgasse 2 – 4, A - 1130 Vienna,
Austria
FN 157284 a, HG Wien
Tel: +43 1 80100 0
E-Mail: h...@scigames.at

This e-mail is confidential and may well also be legally privileged. If you 
have received it in error, you are on notice as to its status and accordingly 
please notify us immediately by reply e-mail and then
delete this message from your system. Please do not copy it or use it for any 
purposes, or disclose its contents to any person as to do so could be a breach 
of confidence. Thank you for your cooperation.
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] How do I know the python functions registered on SQLite ?

2014-05-09 Thread Hick Gunter
We register our defined functions in a linked list in memory for the same 
reason (and have also implemented a .func  in the shell to list 
all/matching registered functions)

-Ursprüngliche Nachricht-
Von: big stone [mailto:stonebi...@gmail.com]
Gesendet: Donnerstag, 08. Mai 2014 18:35
An: sqlite-users@sqlite.org
Betreff: [sqlite] How do I know the python functions registered on SQLite ?

Hello,

Is there a way to get the list of all the 'external' functions created in a  
SQLite connexion ?

(maybe there is no solution except a manual housekeeping)

#* (example of external function creation in Python) import sqlite3 conn = 
sqlite.connect(":memory:") def mysqrt(s):
return ("%s" %s**.5);

conn.create_function('mysqrt', 1, mysqrt)
#*


Regards,
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


---
Gunter Hick
Software Engineer

Scientific Games International GmbH
Klitschgasse 2 – 4, A - 1130 Vienna,
Austria
FN 157284 a, HG Wien
Tel: +43 1 80100 0
E-Mail: h...@scigames.at

This e-mail is confidential and may well also be legally privileged. If you 
have received it in error, you are on notice as to its status and accordingly 
please notify us immediately by reply e-mail and then
delete this message from your system. Please do not copy it or use it for any 
purposes, or disclose its contents to any person as to do so could be a breach 
of confidence. Thank you for your cooperation.
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] FTS3/4 merge function behaviour when deleting rows

2014-05-09 Thread Andrew Moss
I am now totally convinced that FTS3/4 does not work for this usage model.
If you are deleting and inserting documents, the size of the FTS index will
grow in a linear manner with no limit no matter what you do with the merge
command (when you run it, what parameters you provide).

I have separated this issue from my application code and created a python
test script (
https://drive.google.com/folderview?id=0B2OIoOWKs9isdkpySWhmaDg5dmc=sharing)
which does the following;

   - Creates a simple FTS4 table with a single document column
   - Explicity turns on automerge
   - Adds 2000 identical documents
   - Repeatedly deletes the oldest 100 documents and adds 100 more
   - Runs merge=300,8 until no more work is being done after each delete or
1000 insertions.
   - Periodically logs the size of the database and the structure of the
segdir table along with other metrics to a csv file

Note that you will need a recent sqlite library in your python path (eg.
C:\Python27\DLLs). I have been using sqlite version 3.8.4.3

The results of running this test are very clear. Despite the size of the
documents totaling less than 60 KB, the database size grows at a linear
rate with no signs of trending to a limit. You can actually create this
behaviour just by pre-populating the database with 1 document then adding
and deleting a subsequent document repeatedly.

The segdir table contents seem to back up Dan's hypothesis of the index's
FTS behaviour;

On 2 May 2014 07:57, Dan Kennedy  wrote:

> Say your entire database fits into a single level-N b-tree. You keep adding
> data (and delete markers) until there are 15 level-N b-trees and almost
> enough data to create the 16th in lower levels. So at this point the FTS
> index is 16 times its optimal size. If you then add even more data so that
> the 16th level-N b-tree is created, everything gets merged together and
> we're back in the optimal state - everything in a single b-tree. However -
> this b-tree is deemed to be a level-N+1 b-tree. Meaning that this time,
> much more data will have to be added before everything is merged together
> again.
>

Looking at column F in my csv output, I can see that the maximum level is
slowly increasing as the test progresses, so the delete markers for
recently deleted documents (added at level 0) are getting further and
further away from the original trees that reference the deleted documents.
And as I understand it, merge is only going to remove delete markers that
are on the same level in the segdir table as the original document index
data.

I'm not sure about Dan's suggested change to FTS though. Would changing the
incremental merge to allow merging between levels not be better?


> So I'm thinking a solution might be:
>
>   * Fix FTS so that it picks this case - when a merge includes so many
> delete markers that the output is small enough to be deemed a level-N
> b-tree, not a level-N+1 b-tree, and
>
>   * Instead of using the default 16-way merges, the app could organize
> to periodically invoke the "merge=X,Y" command with a smaller Y value
> (say 2) to limit the maximum size of the index to Y times its optimal
> size (instead of 16 times).
>

I am really surprised that FTS behaves this way. To my mind this is a bug
in the FTS extension that makes it unusable for many applications. Was
anyone else aware of this problem or made attempts at resolving it?

Andrew
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] WITHOUT ROWID option

2014-05-09 Thread Sky Meena
i need to transfer sqlite.db from server to client in udp socket.. working
in c language.. .. i dont know how to transmit db. in client side it
should create copy of db.
if client ask name of db to server . server should transmit..


On Fri, May 9, 2014 at 3:09 PM, Stephan Beal  wrote:

> On Fri, May 9, 2014 at 11:38 AM, Stephan Beal 
> wrote:
>
> > i don't think a WHERE is necessary to improve the efficiency. The
> > statement only gets prepared, not stepped, and i would not expect any
> > analysis of results until the first step() (but maybe i'm assuming too
> > much).
> >
>
> In fact, a WHERE, if it's not optimized out, might even add memory cost for
> the tokens required for parsing it.
>
>
> --
> - stephan beal
> http://wanderinghorse.net/home/stephan/
> http://gplus.to/sgbeal
> "Freedom is sloppy. But since tyranny's the only guaranteed byproduct of
> those who insist on a perfect world, freedom will have to do." -- Bigby
> Wolf
> ___
> sqlite-users mailing list
> sqlite-users@sqlite.org
> http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
>
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] WITHOUT ROWID option

2014-05-09 Thread Max Vlasov
On Wed, May 7, 2014 at 6:31 PM, Richard Hipp  wrote:
> On Wed, May 7, 2014 at 9:00 AM, Marco Bambini  wrote:
>
>> What is the best way to know if a table has been created with the WITHOUT
>> ROWID option?
>>
>
>
> (1) You could send "SELECT rowid FROM table" 
>
> (2) Run both "PRAGMA index_list(table)" 
>
>

Is there a way for a virtual table implementation to report that
there's no rowid support before first xRowId call takes place?

Max
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] WITHOUT ROWID option

2014-05-09 Thread Stephan Beal
On Fri, May 9, 2014 at 11:38 AM, Stephan Beal  wrote:

> i don't think a WHERE is necessary to improve the efficiency. The
> statement only gets prepared, not stepped, and i would not expect any
> analysis of results until the first step() (but maybe i'm assuming too
> much).
>

In fact, a WHERE, if it's not optimized out, might even add memory cost for
the tokens required for parsing it.


-- 
- stephan beal
http://wanderinghorse.net/home/stephan/
http://gplus.to/sgbeal
"Freedom is sloppy. But since tyranny's the only guaranteed byproduct of
those who insist on a perfect world, freedom will have to do." -- Bigby Wolf
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] WITHOUT ROWID option

2014-05-09 Thread Stephan Beal
On Fri, May 9, 2014 at 8:36 AM, Andy Goth  wrote:

> On 5/8/2014 10:11 AM, Jim Morris wrote:
>
>> To improve efficiency you could add "where 1=2" to avoid returning any
>> rows.  Should just check validity.
>>
>
> This being SQLite, as previously discussed, you could say "where 0" :^)


i don't think a WHERE is necessary to improve the efficiency. The statement
only gets prepared, not stepped, and i would not expect any analysis of
results until the first step() (but maybe i'm assuming too much).

-- 
- stephan beal
http://wanderinghorse.net/home/stephan/
http://gplus.to/sgbeal
"Freedom is sloppy. But since tyranny's the only guaranteed byproduct of
those who insist on a perfect world, freedom will have to do." -- Bigby Wolf
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


[sqlite] System.Data.SQLite on Windows CE x86 with .NET3.5

2014-05-09 Thread Mattias Kindborg
Doesn't SQLite have support for Windows CE x86 with .NET3.5? On the 
download site for System.Data.SQLite (
http://system.data.sqlite.org/index.html/doc/trunk/www/downloads.wiki) it 
seems that only ARM is supported.

Best regards,
Mattias Kindborg
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] WITHOUT ROWID option

2014-05-09 Thread Andy Goth

On 5/8/2014 10:11 AM, Jim Morris wrote:

To improve efficiency you could add "where 1=2" to avoid returning any
rows.  Should just check validity.


This being SQLite, as previously discussed, you could say "where 0" :^)

--
Andy Goth | 
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users