Re: [sqlite] Reseting total_changes() to 0

2014-08-29 Thread jose isaias cabrera


"Simon Slavin" wrote...

On 29 Aug 2014, at 9:20pm, jose isaias cabrera  
wrote:


Maybe is my lack of SQL knowledge, but I am finding myself having to 
calculate and keep track of changes


Why is the number of changes useful for you to know ?  It's not the sort 
of thing that's useful in pure data manipulation.


The ability to track changes is most useful in a multi-user or 
multi-program system, where one program caches some data.  The program can 
keep a copy of total_changes() with the cache, and as long as 
total_changes() doesn't change, it knows its cache still holds accurate 
data.


Thanks for your response, Simon. It's a long story, but your description is 
somewhat how I am using it: to keep track of changes on two systems and 
updating one system with the data of the other and making sure that they 
amount of changes are the same.  The application is a multiple user 
environment and application.  And, to make it complicated, we are moving 
from one server to another, so there are two instances of the application 
per user on two environment keeping track of the same data on two different 
SharedDBs. In the end, there will only be one server, but until we close all 
of the projects in the old server, the data from the old server is is being 
pushed nightly to the new server.  So, total_changes() has been my friend 
since the end of July.  I know that disconnecting the DBs and connecting 
would reset the function, but, imho, it would be nice to have that simple 
extra reset for situations like this.  Thanks for this wonderful tool.


josé 


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


Re: [sqlite] Simple SQLite-based spreadsheet?

2014-08-29 Thread Drago, William @ MWG - NARDAEAST
I use the personal edition of this: http://www.sqliteexpert.com/

And I use this as well because the built-in graph is handy: 
http://sqlitebrowser.org/

--
Bill Drago
Senior Engineer

L3 Communications / Narda Microwave East
435 Moreland Road
Hauppauge, NY 11788
631-272-5947 / william.dr...@l-3com.com


> -Original Message-
> From: sqlite-users-boun...@sqlite.org [mailto:sqlite-users-
> boun...@sqlite.org] On Behalf Of Gilles Ganault
> Sent: Friday, August 29, 2014 5:09 PM
> To: sqlite-users@sqlite.org
> Subject: Re: [sqlite] Simple SQLite-based spreadsheet?
>
> On Fri, 7 Dec 2012 22:05:47 -0500, John Gabriele 
> wrote:
> >Just checked stackoverflow and found this:
> >https://addons.mozilla.org/en-US/firefox/addon/sqlite-manager/ . Might
> >be what you're after.
>
> Thanks. I'll try it, but judging from the screenshots, but it's
> probably harder than using Excel.
>
> ___
> 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] Simple SQLite-based spreadsheet?

2014-08-29 Thread Gilles Ganault
On Fri, 7 Dec 2012 22:05:47 -0500, John Gabriele
 wrote:
>Just checked stackoverflow and found this:
>https://addons.mozilla.org/en-US/firefox/addon/sqlite-manager/ . Might
>be what you're after.

Thanks. I'll try it, but judging from the screenshots, but it's
probably harder than using Excel.

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


Re: [sqlite] Reseting total_changes() to 0

2014-08-29 Thread Simon Slavin

On 29 Aug 2014, at 9:20pm, jose isaias cabrera  wrote:

> Maybe is my lack of SQL knowledge, but I am finding myself having to 
> calculate and keep track of changes

Why is the number of changes useful for you to know ?  It's not the sort of 
thing that's useful in pure data manipulation.

The ability to track changes is most useful in a multi-user or multi-program 
system, where one program caches some data.  The program can keep a copy of 
total_changes() with the cache, and as long as total_changes() doesn't change, 
it knows its cache still holds accurate data.

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


Re: [sqlite] Reseting total_changes() to 0

2014-08-29 Thread jose isaias cabrera

"Richard Hipp" wrote..

On Fri, Aug 29, 2014 at 12:33 AM, jose isaias cabrera <
jic...@cinops.xerox.com> wrote:


Can total_chages() be set to zero or reset?




No.


Thanks. Maybe is my lack of SQL knowledge, but I am finding myself having to 
calculate and keep track of changes by setting variables and subtracting 
them from the total_changes() function.  I would think that it would be so 
much easier if something like this would work,


total_changes(0);

Then, the total_changes() would reset to 0 and the next changes would be 
just the changes that happened last.  Anyway, thanks for SQLite.  I love it 
and it has made our system pretty powerful.  People keep asking how did do 
that?  I say, "SQLite."  Thanks.


josé 


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


Re: [sqlite] Win32 .def exports != documented APIs ?

2014-08-29 Thread Joe Mistachkin

Howard Kapustein wrote:
> 
> sqlite3_win32_is_nt
> sqlite3_win32_mbcs_to_utf8
> sqlite3_win32_set_directory
> sqlite3_win32_sleep
> sqlite3_win32_utf8_to_mbcs
> sqlite3_win32_write_debug
> 

Jan is correct, these functions are non-portable and are primarily designed
for abstracting differences between Windows and other platforms.  They are
not documented [mostly] because they should not be needed by applications
using SQLite.

There are certain circumstances where using sqlite3_win32_set_directory()
is handy to wrapper libraries running on WinRT; however, the supported
alternative is to use the associated PRAGMAs (e.g. "data_store_directory"
and/or "temp_store_directory") against a temporary in-memory database prior
to opening another database.

--
Joe Mistachkin

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


Re: [sqlite] HELP sqlite3 used in vxworks has someproblem?

2014-08-29 Thread Andy Ling
I would add a printf statement in unixDelete rather than rely on a break point 
working.

Of course, it may not be unixDelete that is the problem, we just need to be 
sure.

Do you have a disk on your target system? If you do, perhaps you could try 
creating the database file on that and see if that works. 

Regards

Andy Ling


From: 王庆刚 [mailto:2004wqg2...@163.com] 
Sent: 29 August 2014 15:49
To: Andy Ling; sqlite-users@sqlite.org
Subject: Re:RE: [sqlite] HELP sqlite3 used in vxworks has someproblem?

hi, Andy Ling
     I have removed the SQLITE_ENABLE_LOCKING_STYLE compile option, so it tell 
me the error : disk I/o error.
       but when I set breakpoint in unixdelete funtion , I found it not enter 
the funtion. I do not know why.
      
     You are right! What OS your host system is running (Windows in my case).
        I want to get some information from the unixdelete funtion.

     Regards
     Wang Qinggang


At 2014-08-29 05:30:23, "Andy Ling"  wrote:

Have you removed the SQLITE_ENABLE_LOCKING_STYLE compile option?
 
On my vxWorks system, if I open a new database and create a table it always 
calls unixDelete trying to delete a “database name”-wal file. This doesn’t 
exist so it has to handle the error.
 
This patch that was added ….
 
#if OS_VXWORKS
    }else if( errno==0x380003 ){ /* == S_dosFsLib_FILE_NOT_FOUND */
  rc = SQLITE_IOERR_DELETE_NOENT;
#endif
 
to handle the error code returned by a dosFs filing system. Before adding this 
patch I got the disk I/O error.
 
Because you are using the host filing system I would guess the error code 
returned will be something different.
 
Looking at the WindRiver documentation for the tsfs driver it says….
 
“The routines in this library return the VxWorks error codes that most closely 
match the errnos generated by the corresponding host function.”
 
So it looks like it will depend on what OS your host system is running (Windows 
I assume in your case).
 
Regards
 
Andy Ling
 
 
From: 163 [mailto:2004wqg2...@163.com] 
Sent: 29 August 2014 03:34
To: Andy Ling
Cc: sqlite-users@sqlite.org; Jan Nijtmans
Subject: Re: [sqlite] HELP sqlite3 used in vxworks has someproblem?
 
i find it not enter the unixdelete.

发自我的 iPhone

在 2014年8月28日,22:42,Andy Ling  写道:
Sorry, I meant unixDelete
 
My guess is that because you are using the host filing system vxWorks will be 
setting yet another error code for a file that doesn’t exist. So it will need 
another check adding to unixDelete
 
Regards
 
Andy Ling
 
 
From: 王庆刚 [mailto:2004wqg2...@163.com] 
Sent: 28 August 2014 15:01
To: Andy Ling
Cc: sqlite-users@sqlite.org; Jan Nijtmans
Subject: Re:RE: Re:RE: [sqlite] HELP sqlite3 used in vxworks has someproblem?
 
 
Is unixUnlink  an function? If it is , but I can not find the funtion in 
sqlite3.c.
 
Regards
 
Wang Qinggang
 



 

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


Re: [sqlite] HELP sqlite3 used in vxworks has someproblem?

2014-08-29 Thread 王庆刚
hi, Andy Ling
 I have removed the SQLITE_ENABLE_LOCKING_STYLE compile option, so it tell 
me the error : disk I/o error.
   but when I set breakpoint in unixdelete funtion , I found it not enter 
the funtion. I do not know why.
  
 You are right! What OS your host system is running (Windows in my case).
I want to get some information from the unixdelete funtion.


 Regards
 Wang Qinggang




At 2014-08-29 05:30:23, "Andy Ling"  wrote:


Have you removed the SQLITE_ENABLE_LOCKING_STYLE compile option?

 

On my vxWorks system, if I open a new database and create a table it always 
calls unixDelete trying to delete a “database name”-wal file. This doesn’t 
exist so it has to handle the error.

 

This patch that was added ….

 

#if OS_VXWORKS

}else if( errno==0x380003 ){ /* == S_dosFsLib_FILE_NOT_FOUND */

  rc = SQLITE_IOERR_DELETE_NOENT;

#endif

 

to handle the error code returned by a dosFs filing system. Before adding this 
patch I got the disk I/O error.

 

Because you are using the host filing system I would guess the error code 
returned will be something different.

 

Looking at the WindRiver documentation for the tsfs driver it says….

 

“The routines in this library return the VxWorks error codes that most closely 
match the errnos generated by the corresponding host function.”

 

So it looks like it will depend on what OS your host system is running (Windows 
I assume in your case).

 

Regards

 

Andy Ling

 

 

From: 163 [mailto:2004wqg2...@163.com]
Sent: 29 August 2014 03:34
To: Andy Ling
Cc:sqlite-users@sqlite.org; Jan Nijtmans
Subject: Re: [sqlite] HELP sqlite3 used in vxworks has someproblem?

 

i find it not enter the unixdelete.

发自我的 iPhone


在 2014年8月28日,22:42,Andy Ling  写道:

Sorry, I meant unixDelete

 

My guess is that because you are using the host filing system vxWorks will be 
setting yet another error code for a file that doesn’t exist. So it will need 
another check adding to unixDelete

 

Regards

 

Andy Ling

 

 

From:王庆刚 [mailto:2004wqg2...@163.com]
Sent: 28 August 2014 15:01
To: Andy Ling
Cc:sqlite-users@sqlite.org; Jan Nijtmans
Subject: Re:RE: Re:RE: [sqlite] HELP sqlite3 used in vxworks has someproblem?

 

 

Is unixUnlink  an function? If it is , but I can not find the funtion in 
sqlite3.c.

 

Regards

 

Wang Qinggang

 







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


Re: [sqlite] Win32 .def exports != documented APIs ?

2014-08-29 Thread Jan Nijtmans
2014-08-29 5:22 GMT+02:00 Howard Kapustein :
> The Win32 DLL download includes a .def file, but comparing the exports with 
> the documentation's function page shows several inconsistencies
>
>
>
> doc but not .def
>
>   *   sqlite3_mutex_held
>   *   sqlite3_mutex_notheld

According to the documentation:
> The SQLite core only
> provides implementations for these routines when it is compiled
> with the SQLITE_DEBUG flag.


>   *   sqlite3_unlock_notify

This function is only available when compiled with
-DSQLITE_ENABLE_UNLOCK_NOTIFY
So that's correct as well.

>   *   sqlite3_version (not a real API just a page name for the various 
> version functions/global so ignore)

Windows DLL's have some problem with exported data, and there
is a function sqlite3_libversion_number() which does the same.


> sqlite3_rtree_geometry_callback
> sqlite3_rtree_query_callback
>
> sqlite3_win32_is_nt

Those 3 are new in SQLite 3.8.6. I doubt the usefulness
of sqlite3_win32_is_nt(), because on current supported
systems this function should return 1 anyway. On
Windows RT it returns - surprisingly -  0 (which is
already fixed on trunk), so this function cannot
be thrusted anyway.     ;-)

> sqlite3_win32_mbcs_to_utf8
> sqlite3_win32_set_directory
> sqlite3_win32_sleep
> sqlite3_win32_utf8_to_mbcs
> sqlite3_win32_write_debug

Those are all win32-specific. The only function that
might be interesting on some embedded
environments (read: Windows CE) is
sqlite3_win32_set_directory(). The other four
are not portable anyway, I don't see any
practical use for them.

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


[sqlite] Win32 .def exports != documented APIs ?

2014-08-29 Thread Howard Kapustein
The Win32 DLL download includes a .def file, but comparing the exports with the 
documentation's function page shows several inconsistencies



doc but not .def

  *   sqlite3_mutex_held
  *   sqlite3_mutex_notheld
  *   sqlite3_unlock_notify
  *   sqlite3_version (not a real API just a page name for the various version 
functions/global so ignore)



.def but not doc

sqlite3_rtree_geometry_callback
sqlite3_rtree_query_callback

sqlite3_win32_is_nt
sqlite3_win32_mbcs_to_utf8
sqlite3_win32_set_directory
sqlite3_win32_sleep
sqlite3_win32_utf8_to_mbcs
sqlite3_win32_write_debug

I'm surprised to see undocumented exports and vice versa, doc'd APIs that 
aren't exported. What's up?



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


Re: [sqlite] Reseting total_changes() to 0

2014-08-29 Thread Richard Hipp
On Fri, Aug 29, 2014 at 12:33 AM, jose isaias cabrera <
jic...@cinops.xerox.com> wrote:

>
> Greetings!
>
> Can total_chages() be set to zero or reset?
>


No.

-- 
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] HELP sqlite3 used in vxworks has someproblem?

2014-08-29 Thread Andy Ling
Have you removed the SQLITE_ENABLE_LOCKING_STYLE compile option?

On my vxWorks system, if I open a new database and create a table it always 
calls unixDelete trying to delete a “database name”-wal file. This doesn’t 
exist so it has to handle the error.

This patch that was added ….

#if OS_VXWORKS
}else if( errno==0x380003 ){ /* == S_dosFsLib_FILE_NOT_FOUND */
  rc = SQLITE_IOERR_DELETE_NOENT;
#endif

to handle the error code returned by a dosFs filing system. Before adding this 
patch I got the disk I/O error.

Because you are using the host filing system I would guess the error code 
returned will be something different.

Looking at the WindRiver documentation for the tsfs driver it says….

“The routines in this library return the VxWorks error codes that most closely 
match the errnos generated by the corresponding host function.”

So it looks like it will depend on what OS your host system is running (Windows 
I assume in your case).

Regards

Andy Ling


From: 163 [mailto:2004wqg2...@163.com]
Sent: 29 August 2014 03:34
To: Andy Ling
Cc: sqlite-users@sqlite.org; Jan Nijtmans
Subject: Re: [sqlite] HELP sqlite3 used in vxworks has someproblem?

i find it not enter the unixdelete.

发自我的 iPhone

在 2014年8月28日,22:42,Andy Ling 
> 写道:
Sorry, I meant unixDelete

My guess is that because you are using the host filing system vxWorks will be 
setting yet another error code for a file that doesn’t exist. So it will need 
another check adding to unixDelete

Regards

Andy Ling


From: 王庆刚 [mailto:2004wqg2...@163.com]
Sent: 28 August 2014 15:01
To: Andy Ling
Cc: sqlite-users@sqlite.org; Jan Nijtmans
Subject: Re:RE: Re:RE: [sqlite] HELP sqlite3 used in vxworks has someproblem?


Is unixUnlink  an function? If it is , but I can not find the funtion in 
sqlite3.c.

Regards

Wang Qinggang






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


Re: [sqlite] String compare scoring functions

2014-08-29 Thread Martin Engelschalk

Hello Maurizio,

1) Logical answer

Comparing two addresses and getting a similarity score can be a VERY 
complicated task if your requirements are high enough, and you can buy 
some very expensive software to perform this. I know because I work with 
some.


2) Technical answer

For such a comparison, you will have to implement your own function in 
sqlite using sqlite3_create_function, see 
http://www.sqlite.org/capi3ref.html#sqlite3_create_function
You cann take the suggestions on stackoverflow and convert them to C or 
at least wrap them in a C function.


Martin

Am 29.08.2014 00:07, schrieb Maurizio Trevisani:

Hello,
I need a function that gives a real result from 0 to 100 representing
the similarity of two input strings.

I need to compare a dataset of addresses with a dataset of addresses
with house numbers, having coordinates, to get a geolocalization of
the addresses.

Since the addresses aren't identical to the addresses of the street
map dataset, I wish to get a score to measure the "similarity" of the
two strings.

I've found 
http://stackoverflow.com/questions/653157/a-better-similarity-ranking-algorithm-for-variable-length-strings
and I hope there is some implementation of a similar function to be
used in Sqlite queries.

Any suggestion, any help?

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


--

*Codeswift GmbH *
Kräutlerweg 20a
A-5020 Salzburg
Tel: +49 (0) 8662 / 494330
Mob: +49 (0) 171 / 4487687
Fax: +49 (0) 3212 / 1001404
engelsch...@codeswift.com
www.codeswift.com / www.swiftcash.at

Codeswift Professional IT Services GmbH
Firmenbuch-Nr. FN 202820s
UID-Nr. ATU 50576309

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