Re: [sqlite] FTS3: synonyms dictionary and tokens length

2011-07-14 Thread Dan Kennedy
On 07/15/2011 03:28 AM, Alexey Pechnikov wrote:
> I want to add the table CREATE TABLE ext_fts_synonyms(word text not
> null unique, synonym text not null); insert into
> ext_fts_synonyms('sqlite','sqlite dbms');
>
> And replace in tokenizer the term 'sqlite' to 2 terms 'sqlite' and
> 'dbms' for search by queries like to
>> select text from fts where fts match 'dbms educate';
> 'SQLite may be useful for education'
>
> But how to return from tokenizer 2 terms or more instead of single
> term?..

I think you could just have the tokenizer return "dbms" whenever
it sees "sqlite" in the input.

Both documents and tokens that appear in queries are transformed
by tokenizers.

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


Re: [sqlite] caveat on blanket UPDATE triggers

2011-07-14 Thread Simon Slavin

On 14 Jul 2011, at 9:28pm, Ben Harper wrote:

> My mistake. The UPDATE trigger can be catch-all-fields (ie no fields 
> specified),
> and it is still correct.

If that is meant to be a normal TRIGGER than you are using curly brackets 
incorrectly.  The syntax does not involve brackets.  See

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

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


Re: [sqlite] my new site is using as backend sqlite

2011-07-14 Thread Artur
I suggest not to use any .tk domains if you use a free one from dot.tk.
They take them away if they feel like it at any time.

> On 14-07-2011 21:40, Sebastian Bermudez wrote:
>> i have this new micro site ready for my personal office
>>
>> http://urlit.tk
>>
>>
>> this site is using sqlite as backend 
>>
>> please, don't smile !! this is very very micro site. for my personal
>> url
>> shorter function
>> ___

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


Re: [sqlite] Script-friendly execution of sqlite3.exe for initializing a DB

2011-07-14 Thread Pavel Ivanov
> Is anyone aware of another technique for preventing interactive mode from
> running?  I've seen this method:
>
> Sqlite3 -init new.sql new.db .exit

How about
sqlite3 new.db ".read new.sql"


Pavel


On Thu, Jul 14, 2011 at 5:20 PM, Marvin Bellamy
 wrote:
> I want to run sqlite3 from a script (actually from a ToolTask in the MSBuild
> environment) and get it to create a database without dropping into
> interactive mode.  It looks like ToolTasks don't like the redirection
> operator (they're interpreted as string literals), so this won't work:
>
>
>
> Sqlite3  new.db < new.sql
>
>
>
> Is anyone aware of another technique for preventing interactive mode from
> running?  I've seen this method:
>
>
>
> Sqlite3 -init new.sql new.db .exit
>
>
>
> But, I 'd rather interactive mode not start at all.
>
> ___
> 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] my new site is using as backend sqlite

2011-07-14 Thread Sebastian Bermudez
Luuk:

  
http://urlit.tk/e51c4is mapping to "http://urlit.Uk;the domain is dot 
"TK" not UK


it's working fine for me..





- Original Message 
From: Luuk 
To: sqlite-users@sqlite.org
Sent: Thu, July 14, 2011 4:50:51 PM
Subject: Re: [sqlite] my new site is using as backend  sqlite

On 14-07-2011 21:40, Sebastian Bermudez wrote:
> i have this new micro site ready for my personal office 
> 
> http://urlit.tk 
> 
> 
> this site is using sqlite as backend 
> 
> please, don't smile !! this is very very micro site. for my personal url 
> shorter function
> ___
> sqlite-users mailing list
> sqlite-users@sqlite.org
> http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

it does not seem to work:
http://urlit.tk/e51c4

;)
___
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] Script-friendly execution of sqlite3.exe for initializing a DB

2011-07-14 Thread Marvin Bellamy
I want to run sqlite3 from a script (actually from a ToolTask in the MSBuild
environment) and get it to create a database without dropping into
interactive mode.  It looks like ToolTasks don't like the redirection
operator (they're interpreted as string literals), so this won't work:

 

Sqlite3  new.db < new.sql

 

Is anyone aware of another technique for preventing interactive mode from
running?  I've seen this method:

 

Sqlite3 -init new.sql new.db .exit

 

But, I 'd rather interactive mode not start at all.

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


Re: [sqlite] my new site is using as backend sqlite

2011-07-14 Thread Alexey Pechnikov
2011/7/14 Sebastian Bermudez :
> please, don't smile !! this is very very micro site. for my personal url
> shorter function

May be you want to see the test site of the business product on Tcl + SQLite? :)
https://merch.mobigroup.ru/
The site language is russian. You can try stemmed SQLite FTS4 search and
enjoy by fast work.

Note: you can guess the admin user password :D

-- 
Best regards, Alexey Pechnikov.
http://pechnikov.tel/
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] caveat on blanket UPDATE triggers

2011-07-14 Thread Ben Harper
Apologies!

My mistake. The UPDATE trigger can be catch-all-fields (ie no fields specified),
and it is still correct.

To answer your question Dan, I am not creating a trigger on an RTree.
I am creating a trigger on a regular table, which keeps the RTree up to date.

Thanks,
Ben


From: sqlite-users-boun...@sqlite.org [sqlite-users-boun...@sqlite.org] on 
behalf of Dan Kennedy [danielk1...@gmail.com]
Sent: 14 July 2011 06:02 PM
To: sqlite-users@sqlite.org
Subject: Re: [sqlite] caveat on blanket UPDATE triggers

On 07/14/2011 10:42 PM, Ben Harper wrote:
> This may be specific to RTree indexes - I haven't taken the time to fully 
> understand it.
>
> Dangerous:
> CREATE TRIGGER ON UPDATE ON tablename { SET RTREE MIN/MAX }
>
> Fine:
> CREATE TRIGGER ON UPDATE OF geometry OF tablename { SET RTREE MIN/MAX }
>
> Failure to specify the field name explicitly results in a corrupt RTree.

Is this an SQLite problem? Or a problem with some system built on
top of SQLite? If it is an SQLite problem, do you have an SQL
script or program to demonstrate it?

SQLite is not supposed to allow triggers on r-tree tables.

Thanks,
Dan.

___
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] FTS3: synonyms dictionary and tokens length

2011-07-14 Thread Alexey Pechnikov
I want to add the table
CREATE TABLE ext_fts_synonyms(word text not null unique, synonym text not null);
insert into ext_fts_synonyms('sqlite','sqlite dbms');

And replace in tokenizer the term 'sqlite' to 2 terms 'sqlite' and 'dbms'
for search by queries like to
> select text from fts where fts match 'dbms educate';
'SQLite may be useful for education'

But how to return from tokenizer 2 terms or more instead of single term?..

Note: Snowball stemmer and stopwords table I did add and can do:
> select text from fts where fts match 'sqlite educate'
SQLite may be useful for education


-- 
Best regards, Alexey Pechnikov.
http://pechnikov.tel/
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] my new site is using as backend sqlite

2011-07-14 Thread Luuk
On 14-07-2011 21:40, Sebastian Bermudez wrote:
> i have this new micro site ready for my personal office 
> 
> http://urlit.tk 
> 
> 
> this site is using sqlite as backend 
> 
> please, don't smile !! this is very very micro site. for my personal url 
> shorter function
> ___
> sqlite-users mailing list
> sqlite-users@sqlite.org
> http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

it does not seem to work:
http://urlit.tk/e51c4

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


[sqlite] my new site is using as backend sqlite

2011-07-14 Thread Sebastian Bermudez
i have this new micro site ready for my personal office 

http://urlit.tk 


this site is using sqlite as backend 

please, don't smile !! this is very very micro site. for my personal url 
shorter function
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] Index question about index

2011-07-14 Thread Simon Slavin

On 14 Jul 2011, at 5:37pm, Black, Michael (IS) wrote:

> Would glob be faster than like?  Since I assume like has to case-convert?

Given your SELECT string:

>> select * from tsamov where tsamov_code like 'AFG%'

If you want speed don't use either, use

SELECT * FROM tsamov WHERE tsamov_code BETWEEN 'AFG' AND 'AFGz'

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


Re: [sqlite] Index question about index

2011-07-14 Thread Black, Michael (IS)
Would glob be faster than like?  Since I assume like has to case-convert?

And you don't have to set any pragmas or NOCASE for it to use the index.



select * from tsamov where tsamov_code glob 'AFG*';



sqlite> explain query plan select * from tsamov where tsamov_code glob 'AFG*';
sele  order  from  deta
  -    
0 0  0 SEARCH TABLE tsamov USING INDEX i1 (tsamov_code>? 
AND tsamov_code> could the next query use the tsamov_code index ??:
>> select * from tsamov where tsamov_code like 'AFG%'
>
> Only after
> pragma case_sensitive_like = true;

... or if the index uses COLLATE NOCASE clause.
--
Igor Tandetnik

___
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: commands not persisting on db.

2011-07-14 Thread Simon Slavin

On 14 Jul 2011, at 5:13pm, Mattia wrote:

> So actually what I do is:
> - run the application;
> - make a copy of the database;
> - select to see what lies inside a table;
> - an insert/delete/insertupdate (obtained from a string) to that table
> in the db-copy;
> - another select, with correct results;
> - closing the connection, disposing the command;
> - deleting the old database and rename the db-copy with the correct name.
> - checking the database with sqlite-administrator: same as before the 
> execution.

You described your problem well but your list is a little unclear.  I'm asking 
for more information so we can understand what you do.

Let us call the copy on disk before the application runs 'a.sqlite'.
Let us call the copy that the application makes 'b.sqlite'.

Please give us the above sequence again using those names, including

(a) which database file you use in each operation
(b) how you copy the database (shell command ?  read and write file ?  sqlite 
commands ?)
(c) where you open the database and which copy/copies you open
(d) how you delete the old database

Also I am not sure what you mean by 'disposing the command'.  Please explain.

Also please check the database using sqlite3 command-line tool found on the 
sqlite web site, not sqlite-administrator.  Your bug may be in 
sqlite-administrator.

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


[sqlite] System.Data.SQLite: commands not persisting on db.

2011-07-14 Thread Mattia
Hello everyone.
I'm a bit embarassed with a problem I am facing, while using
System.Data.SQLite to send commands to my database. The sad thing is
that if I query the database before and after (with a simple select
statement) the block of commands I obtain the expected results, but
when I open the database after the execution, none of my modifications
were been submited.

So actually what I do is:
- run the application;
- make a copy of the database;
- select to see what lies inside a table;
- an insert/delete/insertupdate (obtained from a string) to that table
in the db-copy;
- another select, with correct results;
- closing the connection, disposing the command;
- deleting the old database and rename the db-copy with the correct name.
- checking the database with sqlite-administrator: same as before the execution.

It looks like the commands I do are rollbacked when I close the
connection, or something similar.
I've tried to write a smaller application to simulate the same
behavior, but ...well, it works, so what I suspect is that some sorts
of locks are present on the DB. I think that cause before trying
sending direct sql commands to the DB I was using NHibernate and a
SQLStatement on a connection, but the app crashed with an exception
saying 'Database is Locked'.

Any idea of what can cause my problems?
In the next paste, the code 'cleaned up' that doesn't work:
http://pastebin.com/X2EY31vR

Thanks for the attention (and for any help),
Mat.
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] Index question about index

2011-07-14 Thread Igor Tandetnik
On 7/14/2011 12:01 PM, Pavel Ivanov wrote:
>> could the next query use the tsamov_code index ??:
>> select * from tsamov where tsamov_code like 'AFG%'
>
> Only after
> pragma case_sensitive_like = true;

... or if the index uses COLLATE NOCASE clause.
-- 
Igor Tandetnik

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


Re: [sqlite] caveat on blanket UPDATE triggers

2011-07-14 Thread Dan Kennedy
On 07/14/2011 10:42 PM, Ben Harper wrote:
> This may be specific to RTree indexes - I haven't taken the time to fully 
> understand it.
>
> Dangerous:
> CREATE TRIGGER ON UPDATE ON tablename { SET RTREE MIN/MAX }
>
> Fine:
> CREATE TRIGGER ON UPDATE OF geometry OF tablename { SET RTREE MIN/MAX }
>
> Failure to specify the field name explicitly results in a corrupt RTree.

Is this an SQLite problem? Or a problem with some system built on
top of SQLite? If it is an SQLite problem, do you have an SQL
script or program to demonstrate it?

SQLite is not supposed to allow triggers on r-tree tables.

Thanks,
Dan.

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


Re: [sqlite] Index question about index

2011-07-14 Thread Pavel Ivanov
> could the next query use the tsamov_code index ??:
>    select * from tsamov where tsamov_code like 'AFG%'

Only after
pragma case_sensitive_like = true;


Read more about it here: http://www.sqlite.org/optoverview.html#like_opt.


Pavel


On Thu, Jul 14, 2011 at 11:56 AM, Sebastian Bermudez
 wrote:
> simple question:
>
>
> i have table tsamov
>
> create table tsamov (
> tsamov_id integer not null primary key
> ,tsamov_descri text,
> ,tsamov_code text )
>
> i have index on tsamov_code (it's varchar column of lenght=5)
>
> could the next query use the tsamov_code index ??:
>
>    select * from tsamov where tsamov_code like 'AFG%'
> ___
> 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] Index question about index

2011-07-14 Thread Sebastian Bermudez
simple question:


i have table tsamov

create table tsamov ( 
tsamov_id integer not null primary key
,tsamov_descri text,
,tsamov_code text )

i have index on tsamov_code (it's varchar column of lenght=5)

could the next query use the tsamov_code index ??: 

select * from tsamov where tsamov_code like 'AFG%'
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


[sqlite] caveat on blanket UPDATE triggers

2011-07-14 Thread Ben Harper
This may be specific to RTree indexes - I haven't taken the time to fully 
understand it.

Dangerous:
CREATE TRIGGER ON UPDATE ON tablename { SET RTREE MIN/MAX }

Fine:
CREATE TRIGGER ON UPDATE OF geometry OF tablename { SET RTREE MIN/MAX }

Failure to specify the field name explicitly results in a corrupt RTree.

I assume that either OLD.geometry or NEW.geometry is not available during
the execution of the trigger, so the engine doesn't run the MAXX,MINX,MAXY,
MINY functions, but I haven't taken the time to verify that.

All that I can verify is that if I place a breakpoint inside my MINX class of 
functions,
that breakpoint does not get hit, but the RTree is nevertheless updated.

One symptom of the corruption is:
SELECT * from idx_table_field_geometry,
and  you'll end up with a bunch of 0,0,0,0 MBRs.

Ben


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


Re: [sqlite] FTS3: synonyms dictionary and tokens length

2011-07-14 Thread Dan Kennedy
On 07/14/2011 07:42 PM, Alexey Pechnikov wrote:
>> No. Don't return anything for a stop word. Just advance to the next
>> non stop-word token and return it.
>
> Thanks, I did and it's work.
>
> And another question... Is there any way to use multi-word synonyms? Like to:
> sqlite ->  Open Source SQLite DBMS
>
> I think the single token "Open Source SQLite DBMS" will not useful.

I don't quite follow. Can you rephrase the question?


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


Re: [sqlite] FTS3: synonyms dictionary and tokens length

2011-07-14 Thread Alexey Pechnikov
> No. Don't return anything for a stop word. Just advance to the next
> non stop-word token and return it.

Thanks, I did and it's work.

And another question... Is there any way to use multi-word synonyms? Like to:
sqlite -> Open Source SQLite DBMS

I think the single token "Open Source SQLite DBMS" will not useful.

-- 
Best regards, Alexey Pechnikov.
http://pechnikov.tel/
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] Transaction and SQLITE_CANTOPEN

2011-07-14 Thread Jay A. Kreibich
On Wed, Jul 13, 2011 at 03:52:55PM +0200, Romain Lahore-Carraté scratched on 
the wall:
> Hi,
> 
> I'm experiencing a weird issue and I don't know how to solve it.
> First of all, I work on a multi platform middleware written in C language
> that uses SQLite 3.7.5.
> when I'm doing some tests on Win32, everything is OK, but now I have to use
> this middleware on Android (compiled with android NDK 5).
 
> I suppose this shouldn't be a problem at all, since it works on Win32, but
> some sqlite3_step return SQLITE_CANTOPEN.
> 
> I really don't know what to do now. The only thing I can do is to remove
> transactions. Without transactions I have the same behaviour on Win32 and
> Android.  Do I miss something.

  The issue is likely that SQLite can't open a required journal file,
  locking file, or some other temporary file associated with the
  transaction.  Make sure your application has write/create permissions
  to the directory with the database file.  If you cannot provide that,
  put the database in a subdirectory and provide the permissions on the
  subdirectory.

   -j

-- 
Jay A. Kreibich < J A Y  @  K R E I B I.C H >

"Intelligence is like underwear: it is important that you have it,
 but showing it to the wrong people has the tendency to make them
 feel uncomfortable." -- Angela Johnson
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] Sqlite .net problem error175 in Visual studio 2010

2011-07-14 Thread Joe Mistachkin

> 
> I'm not sure but after the SP1 upgrade, the previous version of Sqlite.net
> stops to works.
> 

I assume you mean SP1 of Visual Studio 2010.  I am not aware of any issues
with the
legacy System.Data.SQLite code on Visual Studio 2010.  Was there a specific
error
message or was the provider simply missing?

>
> My dev machine is a x64, but if I install a x64 version, are the Dll
> continue to work under a x32 system?
>

The x86 packages only include the native binaries required for an x86 system
and
the x64 packages only include the native binaries required for an x64
system.

>
> What are the differnces between the "Bundle" installa nd the other ???
>

The "bundle" packages include a mixed-mode System.Data.SQLite assembly that
contains
all the native code for the SQLite core and the managed code for
System.Data.SQLite.
Since the bundle includes native code, the one for the appropriate
architecture must
be selected.

> 
> So I try the 4 versions my dev machine and... NONE of them are working
> fine.I always have the error 175 indicating that the Sql.lite provider is
> not installed, either during sedign time and at the runtime, which is
never
> appear with the Legacy version.
> 

The VS designer support has not yet been migrated from the legacy version
(1.0.66) of
System.Data.SQLite.

> 
> For runtime, I added the 2 lines in the "DbProviderFactories" part of the
> app.config config file.
> 

When you add the entries for System.Data.SQLite, please be sure the version
number
matches the DLL you are trying to use.

> 
> When I try to add a reference in the project to Sqlite.netDll, I can't
find
> it in the .net list of Dll...
> 

The assemblies listed in the "Add Reference" dialog are not based on the
"app.config"
file.  They are based on the AssemblyFolders[Ex] keys in the registry.  The
legacy
installer for the VS designer modified these registry settings as well.

In theory, you could manually add all the necessary registry settings;
however, it
might be best to temporarily use the legacy version of the
System.Data.SQLite assembly
if you require the VS designer components (if the VS2010 SP1 issue can be
figured out).

--
Joe Mistachkin

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


Re: [sqlite] FTS3: synonyms dictionary and tokens length

2011-07-14 Thread Dan Kennedy
On 07/14/2011 05:29 PM, Alexey Pechnikov wrote:
> With 0-length token in icuNext there is the error:
> Error: SQL logic error or missing database
>
> May xNext returns 0 length when the token is stopword?

No. Don't return anything for a stop word. Just advance to the next
non stop-word token and return it.


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


Re: [sqlite] Is it possible to check a data type in a query?

2011-07-14 Thread Simon Slavin

On 13 Jul 2011, at 1:13pm, Amit Chaudhuri wrote:

> I have situation where a column may contain prices (REAL) or a string
> meaning "no price for this, sorry." I can handle this in application code
> but was wondering if I am overlooking a Sqlite feature which might do the
> same out of the box: perhaps a TYPE( ) or an IsText( ) function..?

There is a 'typeof'.  But you didn't know the proper way to do it.  What you do 
is set up the column to be a number format (real or integer, however you hold 
your prices) and use NULL when you don't have a price.  Then you can very 
quickly and easily check for a NULL with

typeof(X) = 'null'
nullif(X,Y)

or convert it to your 'no price for this' string with

ifnull(X,'No price for this, Sorry.')

In fact this is what NULL means in SQL: something like 'data missing' or 'value 
unknown'.  So it is exactly what you really want.  For more details see



For how to do calculations on numbers that might be NULL, see



For more details than you need don't bother seeing



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


Re: [sqlite] Is it possible to check a data type in a query?

2011-07-14 Thread Richard Hipp
On Wed, Jul 13, 2011 at 8:13 AM, Amit Chaudhuri
wrote:

> Hi all,
>
> I have situation where a column may contain prices (REAL) or a string
> meaning "no price for this, sorry." I can handle this in application code
> but was wondering if I am overlooking a Sqlite feature which might do the
> same out of the box: perhaps a TYPE( ) or an IsText( ) function..?
>

The typeof() function.  http://www.sqlite.org/lang_corefunc.html#typeof


>
> A
> ___
> 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


[sqlite] Transaction and SQLITE_CANTOPEN

2011-07-14 Thread Romain Lahore-Carraté
Hi,

I'm experiencing a weird issue and I don't know how to solve it.
First of all, I work on a multi platform middleware written in C language
that uses SQLite 3.7.5.
when I'm doing some tests on Win32, everything is OK, but now I have to use
this middleware on Android (compiled with android NDK 5).

Here is the problem:
The database file is located on a sdcard. I use SQL transaction to minimize
the number of read/write operations.
The problem is that I have to  ADD/UPDATE/DELETE some rows during the
transaction.
I suppose this shouldn't be a problem at all, since it works on Win32, but
some sqlite3_step return SQLITE_CANTOPEN.

I really don't know what to do now. The only thing I can do is to remove
transactions. Without transactions I have the same behaviour on Win32 and
Android.
Do I miss something.

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


[sqlite] Is it possible to check a data type in a query?

2011-07-14 Thread Amit Chaudhuri
Hi all,

I have situation where a column may contain prices (REAL) or a string
meaning "no price for this, sorry." I can handle this in application code
but was wondering if I am overlooking a Sqlite feature which might do the
same out of the box: perhaps a TYPE( ) or an IsText( ) function..?

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


Re: [sqlite] FTS3: synonyms dictionary and tokens length

2011-07-14 Thread Alexey Pechnikov
With 0-length token in icuNext there is the error:
Error: SQL logic error or missing database

May xNext returns 0 length when the token is stopword?

-- 
Best regards, Alexey Pechnikov.
http://pechnikov.tel/
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


[sqlite] Sqlite .net problem error175 in Visual studio 2010

2011-07-14 Thread Jean Bon
Hi all,

I was using the legacy version of Sqlite.net with Visual studio 2010 and it
works fine.
I can create an application with the Entity Framework without problem.

I'm not sure but after the SP1 upgrade, the previous version of Sqlite.net
stops to works.
I install the new version with .net 4 support.

I was in trouble because I don't understand what is the difference between
the 4 install versions.
My dev machine is a x64, but if I install a x64 version, are the Dll
continue to work under a x32 system?
What are the differnces between the "Bundle" installa nd the other ???

So I try the 4 versions my dev machine and... NONE of them are working
fine.I always have the error 175 indicating that the Sql.lite provider is
not installed, either during sedign time and at the runtime, which is never
appear with the Legacy version.

For runtime, I added the 2 lines in the "DbProviderFactories" part of the
app.config config file.

When I try to add a reference in the project to Sqlite.netDll, I can't find
it in the .net list of Dll...

I'm lost and I can't continue my dev now...

Thank you for your help
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users