Re: [sqlite] rtree_i32

2010-01-18 Thread Dan Kennedy

On Jan 19, 2010, at 2:44 AM, martin goodson wrote:

> Hi
> I found the messages on this forum giving the advice to use rtree_i32
> in order to make use of integer coordinates. This is very important
> for the uptake of rtree among the bioinformatics community. Has it
> been announced whether this will become a documented feature of rtree?
> At the moment everything works perfectly but I do not want to base my
> libraries on something that may be removed at any time. Some
> clarification on this point would be greatly appreciated.

It's a stable feature that won't be removed. It should be documented.

Dan.

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


Re: [sqlite] Questions regaring SQLite support on N97

2010-01-18 Thread Simon Slavin

On 19 Jan 2010, at 2:33am, Bill King wrote:

> Things are getting better, qt and qtcreator for s60's making things
> noticeably easier, and there's a QtSql wrapper for the sqlite server
> engine access in the works, or native sqlite is included in qt/s60 by
> default.

That's all good news.  I tried developing for S60 about five years ago and gave 
up in disgust.  (I'm an experienced developer on both large and embedded, 
high-level and low-level systems, I didn't just wimp out at the first hurdle.)  
Everything you mentioned there sounds like a huge improvement.

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


Re: [sqlite] load_extension() and extension-functions.c

2010-01-18 Thread Liam Healy
On Mon, Jan 18, 2010 at 5:18 AM, Oliver Peters  wrote:
> Hello out there,
>
> I just wanted to say "thank you" for this wonderful feature (load_extension) 
> and
> the work invested into these very useful extra functions 
> (extension-functions.c).

Thanks!  The real work on extension-functions was done by Mikey C and his
coworkers.  I packaged it up and added documentation.

>
>
> From the view of a non programmer (only heavy user) I've 2 suggestions and 1
> question.
>
...

>
>
> s2: extension-functions.c
> -
> add compilation instructions for windows

I don't know how to compile in windows; if you or
someone has some instructions, I'll add them.

>
>
> q1:
> 
> I used gcc version 3.4.5 (mingw-vista special r3) to compile
> "extension-functions.c" with the following options
>
> gcc -shared -fPIC -I "c:\Programme\SQLite" -o libsqlitefunctions.so
> extension-functions.c
> (I copied sqlite3ext.h before to "c:\Programme\SQLite")
>
> and got the following error message:
>
> extension-functions.c:1: warning: -fPIC ignored for target (all code is 
> position
> independent)
>
> Where's my mistake?
>

As someone else said, that's a warning, not an error.  Just ignore it,
or remove the -fPIC if it bothers you.

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


Re: [sqlite] Questions regaring SQLite support on N97

2010-01-18 Thread Bill King
On 01/19/2010 12:11 PM, ext Simon Slavin wrote:
> On 19 Jan 2010, at 2:02am, Pedro Brigatto wrote:
>
>   
>> I would like to know if there is any way to use SQLite on Nokia N97 (I've
>> been surfing on the web but got no answers to any of my questions regarding
>> it yet).
>> If the answer is *yes*, how could I get more info to get started on
>> developing my application using this DB?
>> 
> The Nokia N97 is an Nseries phone that runs Symbian Series 60.  This
>
> 
>
> or something like it should do what you want.  Google on 'symbian S60 sqlite'.
>
> In terms of starting to develop for Symbian, my advice is to get just enough 
> experience with it to persuade yourself that it's a world of frustration and 
> pain.  You can get started by looking at Nokia's Developer site and 
> downloading the Symbian development tools.  After a month or two you can move 
> to the iPhone or Android and regrow some hair.
>
> Simon.
> ___
> sqlite-users mailing list
> sqlite-users@sqlite.org
> http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
>   
Things are getting better, qt and qtcreator for s60's making things
noticeably easier, and there's a QtSql wrapper for the sqlite server
engine access in the works, or native sqlite is included in qt/s60 by
default.

-- 
Bill King, Software Engineer
Qt Development Frameworks, Nokia Pty Ltd
Brisbane Office

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


Re: [sqlite] Index creation in a memory database

2010-01-18 Thread Igor Tandetnik
David Alcelay wrote:
> 3) create an index over this table:
> create index memoria.Dispositivos_TipoDispositivo on memoria.Dispositivos 
> (Tipo_Dispositivo)
> 
> I get this error: near ".": syntax error

You don't specify database name in trigger name; the appropriate database is 
inferred from the table the trigger is on. Make it

create index Dispositivos_TipoDispositivo on memoria.Dispositivos 
(Tipo_Dispositivo)

> But, if I remove the step 1 (prepare the memory database, and erase the 
> 'memoria.' in the next creation sentences, the creation
> of the index is OK

It's the "erase" part that fixes the error, not the "not using memory database" 
part.

Igor Tandetnik

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


Re: [sqlite] Questions regaring SQLite support on N97

2010-01-18 Thread Simon Slavin

On 19 Jan 2010, at 2:02am, Pedro Brigatto wrote:

> I would like to know if there is any way to use SQLite on Nokia N97 (I've
> been surfing on the web but got no answers to any of my questions regarding
> it yet).
> If the answer is *yes*, how could I get more info to get started on
> developing my application using this DB?

The Nokia N97 is an Nseries phone that runs Symbian Series 60.  This



or something like it should do what you want.  Google on 'symbian S60 sqlite'.

In terms of starting to develop for Symbian, my advice is to get just enough 
experience with it to persuade yourself that it's a world of frustration and 
pain.  You can get started by looking at Nokia's Developer site and downloading 
the Symbian development tools.  After a month or two you can move to the iPhone 
or Android and regrow some hair.

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


[sqlite] Questions regaring SQLite support on N97

2010-01-18 Thread Pedro Brigatto
Hi, all!
This is my first post on this list. Thank you in advance for your time on
reading it.

I would like to know if there is any way to use SQLite on Nokia N97 (I've
been surfing on the web but got no answers to any of my questions regarding
it yet).
If the answer is *yes*, how could I get more info to get started on
developing my application using this DB?
If the answer is *no*, is there any 'relational' database to be used on this
device? Right now, the only solution to me sounds to be RMS, but it would be
amazing to be able to use a database properly said, since the tasks and the
how-to-do would be pretty much closer to the way I work on DB for
stand-alone and web applications.

Well, I thank you again and in advance, and would be glad if I get any
answer to this post.

Best regards,
-- 
*Pedro Eugênio Cunha Brigatto*
- Software Engineering Specialist -
- Sun Certified Java Programmer -
- SAP Netweaver Certified Java Consultant -
- Java ME Designer -
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


[sqlite] BLOB handle expires when unrelated table is UPDATED!?

2010-01-18 Thread a1rex
 According to the documentation athttp://www.sqlite.org/c3ref/blob_open.html
“
If the row that a BLOB handle points to is
modified by an UPDATE, DELETE, or by ON CONFLICT side-effects
then the BLOB handle is marked as "expired". 
This is true if any column of the row is
changed, even a column other than the one the BLOB handle is open on.
 Calls to sqlite3_blob_read() and sqlite3_blob_write() for
a expired BLOB handle fail with an return code of SQLITE_ABORT.
”
 
However, it looks that handle can expire
when UPDATE is done on the column in the other unrelated to the blob table.
Read of the blob would return SQLITE_ABORT “not an error”(?!) and no data is 
read.
 
 
Is it a bug, a feature or the expected
behaviour? 
 
 
Thanks for your
attention.
 
 P.S
 
Searching the web I
found the following reference:
blob incremental i/o constraints
by Roger Binns Dec 02, 2007; 02:15am
Open a blob for reading.  Insert into the same table (not affecting the 
blob or its row).  On calling sqlite3_blob_read, I get SQLITE_ABORT 
returned and the errmsg is "not an error".  This also
happens if I do a 
few reads, and then the insert, on the next read.  (This also happens 
with blobs open for writing and doing read or write after the table is 
changed).


  __
Yahoo! Canada Toolbar: Search from anywhere on the web, and bookmark your 
favourite sites. Download it now
http://ca.toolbar.yahoo.com.
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


[sqlite] rtree_i32

2010-01-18 Thread martin goodson
Hi
I found the messages on this forum giving the advice to use rtree_i32  
in order to make use of integer coordinates. This is very important  
for the uptake of rtree among the bioinformatics community. Has it  
been announced whether this will become a documented feature of rtree?  
At the moment everything works perfectly but I do not want to base my  
libraries on something that may be removed at any time. Some  
clarification on this point would be greatly appreciated.

thanks very much
Martin Goodson

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


[sqlite] Index creation in a memory database

2010-01-18 Thread David Alcelay
Hi!
I started having problems when I started using sqlite in 'memory' mode, this 
is, workin only in memory.
It was not a problem to configure this working mode, it's really easy, but 
somethings goes wrong. So, working in no memory mode works ok, but if I go to 
memory mode, doesn't work with a extrange error, I think that a bug.
Steps:
1) attatch to a 'memory' database: attach database ':memory:' as memoria(OK)
2) create the tables: (I write only the one I have problems)
   create table memoria.Dispositivos (Indice PRIMARY KEY, Tipo_Dispositivo 
INTEGER, Numero_Dispositivo INTEGER, Habilitado INTEGER, Activado INTEGER, 
Estado INTEGER, Codigo_Error INTEGER, Parametro_01_PLC INTEGER, 
Parametro_01_WCS INTEGER, Parametro_02_PLC INTEGER, Parametro_02_WCS INTEGER, 
Parametro_03_PLC INTEGER, Parametro_03_WCS INTEGER, Parametro_04_PLC INTEGER, 
Parametro_04_WCS INTEGER, Parametro_05_PLC INTEGER, Parametro_05_WCS INTEGER, 
Parametro_06_PLC INTEGER, Parametro_06_WCS INTEGER, Parametro_07_PLC INTEGER, 
Parametro_07_WCS INTEGER, Parametro_08_PLC INTEGER, Parametro_08_WCS INTEGER, 
Parametro_09_PLC INTEGER, Parametro_09_WCS INTEGER, Parametro_10_PLC INTEGER, 
Parametro_10_WCS INTEGER, Parametro_01_STRING_WCS TEXT, Parametro_02_STRING_WCS 
TEXT, Parametro_03_STRING_WCS TEXT, Parametro_04_STRING_WCS TEXT, 
Parametro_05_STRING_WCS TEXT, Parametro_06_STRING_WCS TEXT, 
Parametro_07_STRING_WCS TEXT, Parametro_08_STRING_WCS TEXT, 
Parametro_09_STRING_WCS TEXT, Parametro_10_STRING_WCS TEXT)
 
(the creation is OK)
 
3) create an index over this table:
 create index memoria.Dispositivos_TipoDispositivo on memoria.Dispositivos 
(Tipo_Dispositivo)
 
I get this error: near ".": syntax error
 
 
But, if I remove the step 1 (prepare the memory database, and erase the 
'memoria.' in the next creation sentences, the creation of the index is OK, so 
I think is some kind of error in the sintax parsing or something like that.
 
Hope this is helpfull.
Regards,
   David Alcelay
 
 
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] BUG: .echo ON in command line tool doesn't echo all statements

2010-01-18 Thread Kees Nuyt
On Mon, 18 Jan 2010 13:18:57 -0500, Shane Harrelson
 wrote:

>On Fri, Jan 8, 2010 at 5:17 AM, Kees Nuyt  wrote:

>> > Between versions 3.6.19 and 3.6.20 something has changed
>> > which causes the command line tool to ignore the .echo ON
>> > command for some statements.

[...]

>> Can anyone confirm this behaviour?

>
>Confirmed.   Fixed here:   http://www.sqlite.org/src/vinfo/7080ae3bc3
>Thanks for the report.
>
>-Shane

Thanks for fixing!
-- 
  (  Kees Nuyt
  )
c[_]
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] BUG: .echo ON in command line tool doesn't echo all statements

2010-01-18 Thread Shane Harrelson
On Fri, Jan 8, 2010 at 5:17 AM, Kees Nuyt  wrote:

>
> (Repeated with the proper BUG: subject)
>
> On Mon, 04 Jan 2010 19:55:13 +0100, Kees Nuyt
>  wrote:
>
> > Between versions 3.6.19 and 3.6.20 something has changed
> > which causes the command line tool to ignore the .echo ON
> > command for some statements.
> >
> > CREATE and INSERT statements aren't echoed anymore,
> > but SELECT statements are echoed correctly.
> >
> > Needless to say that this makes it a bit harder to debug SQL
> > scripts or prepare demo output to help other people.
> >
> > Platform tested: MS Windows (Vista 32-bit).
>
> Additional info:
>
> sqlite3 command line tool executable for Windows straight
> from http://www.sqlite.org/download.html
>
> Version 3.6.22 has the same bug.
>
> Can anyone confirm this behaviour?
> --
>  (  Kees Nuyt
>  )
> c[_]
>
>

Confirmed.   Fixed here:   http://www.sqlite.org/src/vinfo/7080ae3bc3
Thanks for the report.

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


Re: [sqlite] load_extension() and extension-functions .c

2010-01-18 Thread Jean-Christophe Deschamps

>s2: extension-functions.c
>-
>add compilation instructions for windows
>
>q1:
>
>I used gcc version 3.4.5 (mingw-vista special r3) to compile
>"extension-functions.c" with the following options
>
>gcc -shared -fPIC -I "c:\Programme\SQLite" -o libsqlitefunctions.so
>extension-functions.c
>(I copied sqlite3ext.h before to "c:\Programme\SQLite")

I built several Windows extensions and always use:

gcc -O2 -lm -shared xyz.c -o xyz.dll

You need sqlite3.h as well.  Add -I "c:\Programme\SQLite" as required.

Don't forget to invoke sqlite3_enable_load_extension() before loading.



Since you're new to this, there is something that AFAIK is not 
documented at all.  Depending on your execution context, it can lead to 
extreme frustration and wasted hours.

It is plain impossible to override any native SQLite function with 
custom functions declared as using UTF-8 encoding: the override won't 
work and return SQLITE_BUSY _if_ you are loading with SQL "select 
sqlite3_load_extension(...).
Loading from the C interface will work if there are no other SQL being 
processed on the same connection by the time of loading.
Loading + overriding from SQL _will_ work for functions not explicitely 
declared for the UTF-8 encoding.  Loading new functions works like a charm.

This may look like anectodical, but implies a series of consequences 
that prove to be a delicious nightmare in practice.  You compiled 
application may work well (calling from C works in all cases), but you 
won't be able to load the same extension in most SQLite managers from 
SQL (and then provide no way to invoke loading from C).  Using any 
wrapper not explicitely having a special SQLite device for loading from 
C is hopeless, so no JDBC, ODBC, AOD, a.s.o.

These are serious limitations that you must be aware of beforehand.

There exists "half" a workaround, but it also has drawbacks.  You can 
load an extension using the sqlite3_auto_extension() mecanism, even 
from SQL!  Of course, the extension need to be prepared for that.

Have a C function, going like that:
DLL_EXPORT int auto_load(
 sqlite3 *db,
 char **pzErrMsg,
 const sqlite3_api_routines *pApi
){
 UNUSED_PARAMETER(db);
 UNUSED_PARAMETER(pzErrMsg);
 UNUSED_PARAMETER(pApi);
 sqlite3_auto_extension((void*)sqlite3_extension_init);
 return SQLITE_OK;
}

By entering   select sqlite_load_extension("mydll.dll", 
"auto_load");  you can make SQLite perform the C call to 
sqlite3_auto_extension() for you.  This of course is an SQL statement 
that must be entered using an open connection.  At this point, your 
real extension entry point has been remembered by SQLite and will be 
used when opening any new database connection.  In short, you need to 
first make a dummy connection, issue your SQL loading select and then 
open your real connection.
Doing so means that your extension will be loaded for _all_ new 
connections, so once this is done, there is no way, in the same SQLite 
session, to avoid having the extension loaded.  Also having different 
custom functions overriding native functions at the same time is 
impossible.

Because of sacred politicorrectness self-limitation, I won't describe 
here what a royal pain in the ass all of this is, with all the due 
respect I owe to the SQLite team.

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


Re: [sqlite] Fossil/SQLite server is down

2010-01-18 Thread D. Richard Hipp

On Jan 18, 2010, at 2:48 AM, David Koenig wrote:

> The server hosting Fossil and SQLite is down. You or the admins (if
> there are admins other than you) probably know by now, but this can't
> hurt.
>

This would be a problem at our service provider, Linode.  They have  
been  alerted to the malfunction.  In the meantime, you can access the  
first backup server at

http://www2.sqlite.org/
http://www2.fossil-scm.org/

Unfortunately, not all services are available on the backup.   
Specifically, the mailing lists and the download page for Fossil  
precompiled executables are only available on the primary server.  But  
hopefully Linode will have the problem resolved soon.

A second backup server is provided by a different hosting service  
(Hurricane Electric) but hopefully that 2nd backup will not be  
necessary

D. Richard Hipp
d...@hwaci.com



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


Re: [sqlite] load_extension() and extension-functions .c

2010-01-18 Thread MikeW
Oliver Peters  writes:

> 
> Hello out there,
> ...snip...
> q1:
> 
> I used gcc version 3.4.5 (mingw-vista special r3) to compile
> "extension-functions.c" with the following options
> 
> gcc -shared -fPIC -I "c:\Programme\SQLite" -o libsqlitefunctions.so
> extension-functions.c
> (I copied sqlite3ext.h before to "c:\Programme\SQLite")
>
> and got the following error message:
>
> extension-functions.c:1: warning: -fPIC ignored for target (all code
is position
> independent)
> ...snip...

1. It's a Warning, not an Error, so will still work
2. looks like -fPIC is redundant if you specify -shared; maybe this applies
to later compiler version than in wiki example ?

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


[sqlite] load_extension() and extension-functions .c

2010-01-18 Thread Oliver Peters
Hello out there,

I just wanted to say "thank you" for this wonderful feature (load_extension) and
the work invested into these very useful extra functions 
(extension-functions.c).


>From the view of a non programmer (only heavy user) I've 2 suggestions and 1
question.

s1: http://www.sqlite.org/cvstrac/wiki?p=LoadableExtensions
---
SELECT load_extension('filename');

Please give an example for filename like 'C:\programs\sqlite\helpfunctions.dll'
(I didn't have a problem with this but there might be other users (non
programmers) who do have)


s2: extension-functions.c
-
add compilation instructions for windows


q1:

I used gcc version 3.4.5 (mingw-vista special r3) to compile
"extension-functions.c" with the following options

gcc -shared -fPIC -I "c:\Programme\SQLite" -o libsqlitefunctions.so
extension-functions.c
(I copied sqlite3ext.h before to "c:\Programme\SQLite")

and got the following error message:

extension-functions.c:1: warning: -fPIC ignored for target (all code is position
independent)

Where's my mistake?

Greetings
Oliver

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