[sqlite] .headers error

2012-03-26 Thread YAN HONG YE
C:\sqlite\lib>sqlite3 -html foods.db "select * from dzh;" >mm.html "-headers on" sqlite3: Error: too many options: "-headers on" Use -help for a list of options. how to write this command? ___ sqlite-users mailing list sqlite-users@sqlite.org

Re: [sqlite] NaN in, 0.0 out?

2012-03-26 Thread Nico Williams
On Mon, Mar 26, 2012 at 9:42 PM, Jay A. Kreibich wrote: > On Tue, Mar 27, 2012 at 03:30:03AM +0100, Simon Slavin scratched on the wall: >  Not do drag things out, but how would you "handle" a NaN?  If someone >  writes a signaling-NaN into the database, the DB will start to throw

[sqlite] HOW TO EXPORT TABLE HEAD

2012-03-26 Thread YAN HONG YE
WHEN I export sqlite database to a html file or txt file, I couldn't know how to include the database table head. who can tell me? Thank you! ___ sqlite-users mailing list sqlite-users@sqlite.org

Re: [sqlite] how to export to html file with table

2012-03-26 Thread Larry Brasfield
On March 26, YAN HONG YE wrote: (apparently quoting Steinar Midtskogen, quotation demarked) > to export to the html file command is: sqlite3 -html film.db "select * from film" > mm.html but the result had no table,only a text file without line feed, how to export the html with tables and

Re: [sqlite] NaN in, 0.0 out?

2012-03-26 Thread Jay A. Kreibich
On Tue, Mar 27, 2012 at 03:30:03AM +0100, Simon Slavin scratched on the wall: > > On 27 Mar 2012, at 3:12am, Jay A. Kreibich wrote: > > > On Sun, Mar 25, 2012 at 05:48:01AM +0100, Simon Slavin scratched on the > > wall: > > > >> Can those values be passed from a 'double' C

Re: [sqlite] NaN in, 0.0 out?

2012-03-26 Thread Simon Slavin
On 27 Mar 2012, at 3:12am, Jay A. Kreibich wrote: > On Sun, Mar 25, 2012 at 05:48:01AM +0100, Simon Slavin scratched on the wall: > >> Can those values be passed from a 'double' C variable ? I believe so. >> So I see no reason why SQLite shouldn't be storing them. > > If, in

Re: [sqlite] NaN in, 0.0 out?

2012-03-26 Thread Jay A. Kreibich
On Sun, Mar 25, 2012 at 05:48:01AM +0100, Simon Slavin scratched on the wall: > On 25 Mar 2012, at 3:48am, "Jay A. Kreibich" wrote: > > On Sat, Mar 24, 2012 at 07:32:32AM -0400, Richard Hipp scratched on the > > wall: > > > >> SQLite converts NaN inputs into NULL. > > > > I

Re: [sqlite] how to export to html file with table

2012-03-26 Thread Simon Slavin
On 27 Mar 2012, at 2:22am, YAN HONG YE wrote: > From: Steinar Midtskogen > >> to export to the html file command is: >> >> sqlite3 -html film.db "select * from film" > mm.html > > but the result had no table,only a text file without line feed,

[sqlite] how to export to html file with table

2012-03-26 Thread YAN HONG YE
Date: Mon, 26 Mar 2012 08:22:56 +0200 From: Steinar Midtskogen to export to the html file command is: sqlite3 -html film.db "select * from film" > mm.html but the result had no table,only a text file without line feed, how to export the html with tables and table

Re: [sqlite] VACUUMing large DBs

2012-03-26 Thread Peter Aronson
Actually, it can't be in a transaction.  To quote: "A VACUUM will fail if there is an open transaction, or if there are one or more active SQL statements when it is run."  (See http://www.sqlite.org/lang_vacuum.html). Best regards, Peter From: Pete

Re: [sqlite] VACUUMing large DBs

2012-03-26 Thread Simon Slavin
On 26 Mar 2012, at 6:14pm, Pete wrote: > SHould a VACUUM command be wrapped in a transaction, or is that done > automatically? All SQLite commands, even ones like SELECT which don't change anything, are actually executed inside a transaction. If you've already opened

Re: [sqlite] VACUUMing large DBs

2012-03-26 Thread Pete
SHould a VACUUM command be wrapped in a transaction, or is that done automatically? -- Pete ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Re: [sqlite] How should I get the affected rows' ids

2012-03-26 Thread Petite Abeille
On Mar 26, 2012, at 12:03 PM, Wu Jian wrote: > The only way I know to achieve this is write several SQL strings like this: > SELECT id FROM this_table WHERE id > 2; > foreach (_id in selection) > UPDATE this_table SET data='abc' WHERE id=_id Along these lines, you could do it in just two

Re: [sqlite] NaN in, 0.0 out?

2012-03-26 Thread Simon Slavin
On 26 Mar 2012, at 4:58pm, Pavel Ivanov wrote: > SQLite version 3.7.5 > Enter ".help" for instructions > Enter SQL statements terminated with a ";" > sqlite> create table t (n); > sqlite> insert into t values (1e305 * 1e305); > sqlite> insert into t values (-1e305 * 1e305);

Re: [sqlite] NaN in, 0.0 out?

2012-03-26 Thread Pavel Ivanov
> Storing +infinity, for example.  It seems that in IEEE terms +infinity is > different from NaN, but SQLite return NULL in both instances. This is apparently some problem with your test setup. SQLite version 3.7.5 Enter ".help" for instructions Enter SQL statements terminated with a ";" sqlite>

Re: [sqlite] NaN in, 0.0 out?

2012-03-26 Thread Simon Slavin
On 26 Mar 2012, at 3:37pm, "Francis J. Monari, Esquire" wrote: > Storing +infinity, for example. It seems that in IEEE terms +infinity is > different from NaN, but SQLite return NULL in both instances. Oh dear. Where is the conversion happening ? Is the value stored

Re: [sqlite] How should I get the affected rows' ids

2012-03-26 Thread Simon Slavin
On 26 Mar 2012, at 4:23pm, Wu Jian wrote: > I need to record these ids so that I can get and sync the changes with > server in the feature. Have a routine which turns an 'UPDATE' command into a 'SELECT' command, and use that before you use the UPDATE. Or use TRIGGERs as

Re: [sqlite] How should I get the affected rows' ids

2012-03-26 Thread Wu Jian
Thanks for your reply, Igor. Trigger is a solution, but it still has a efficient problem as I know. May be I'm wrong with this idea, so I would try trigger and do some benchmarks on it. Still I wanna know is there another way to solve this problem, thanks. On Mon, Mar 26, 2012 at 8:00 PM, Igor

Re: [sqlite] How should I get the affected rows' ids

2012-03-26 Thread Wu Jian
I need to record these ids so that I can get and sync the changes with server in the feature. On Mon, Mar 26, 2012 at 8:00 PM, Igor Tandetnik wrote: > Wu Jian wrote: > > then I exec a SQL like this UPDATE this_table SET data='abc' WHERE id > > 2. > >

Re: [sqlite] SQLITE 3.7.11 Bug

2012-03-26 Thread Larry Levesque
And had I gone with my instincts, I would have done that from the start. Thank you for the quick response!! On Mon, Mar 26, 2012 at 08:35:06AM -0400, Richard Hipp wrote: > On Mon, Mar 26, 2012 at 8:31 AM, Larry Levesque wrote: > > > Linux - Ubuntu 10.04 and 11.04 for me. > >

Re: [sqlite] NaN in, 0.0 out?

2012-03-26 Thread Francis J. Monari, Esquire
All, Storing +infinity, for example. It seems that in IEEE terms +infinity is different from NaN, but SQLite return NULL in both instances. Is there a standard "SQLite" style of handling this situation? Frank. Francis J. Monari, Esquire McKernan, McKernan & Godino 113 North Sixth Street

Re: [sqlite] 64-bit Windows Command Shell

2012-03-26 Thread Black, Michael (IS)
You can compile your own 64-bit version using mingw http://sourceforge.net/projects/mingw-w64/files/Toolchains%20targetting%20Win64/ Michael D. Black Senior Scientist Advanced Analytics Directorate Advanced GEOINT Solutions Operating Unit Northrop Grumman Information Systems

Re: [sqlite] SQLITE 3.7.11 Bug

2012-03-26 Thread Richard Hipp
On Mon, Mar 26, 2012 at 8:31 AM, Larry Levesque wrote: > Linux - Ubuntu 10.04 and 11.04 for me. > The precompiled command-lien shells for linux omit command-line editing because command-line editing requires certain libraries that are not found on all linux distributions. If

Re: [sqlite] SQLITE 3.7.11 Bug

2012-03-26 Thread Larry Levesque
Linux - Ubuntu 10.04 and 11.04 for me. On Mon, Mar 26, 2012 at 08:29:21AM -0400, Richard Hipp wrote: > On Sun, Mar 25, 2012 at 11:29 AM, David Holland wrote: > > > The SQLITE 3.7.11 shell does not allow user to repeat or edit entered > > commands with the arrow keys. > > >

Re: [sqlite] SQLITE 3.7.11 Bug

2012-03-26 Thread Richard Hipp
On Sun, Mar 25, 2012 at 11:29 AM, David Holland wrote: > The SQLITE 3.7.11 shell does not allow user to repeat or edit entered > commands with the arrow keys. > > What operating system? > > David Holland > dlh.holl...@gmail.com > >

Re: [sqlite] memory handling problems in 3.710 - 3.7.11

2012-03-26 Thread Richard Hipp
On Sun, Mar 25, 2012 at 9:32 PM, Laszlo Boszormenyi wrote: > Hi, > > On Debian and amd64 architecture SQLite3 has a severe problem. If I just > start it, I can create a simple table like "create table a(b int);". > However when I set "export MALLOC_CHECK_=1" then the mentioned

Re: [sqlite] How should I get the affected rows' ids

2012-03-26 Thread Kit
UPDATE this_table SET data='abc' WHERE id > 2; SELECT id FROM this_table WHERE id > 2; -- Kit ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Re: [sqlite] SQLITE 3.7.11 Bug

2012-03-26 Thread Larry Levesque
I found this as well and figured it was just my settings. It's good to know it was not just me. I checked it on 4 different computers with the same results. On Sun, Mar 25, 2012 at 10:29:09AM -0500, David Holland wrote: > The SQLITE 3.7.11 shell does not allow user to repeat or edit entered >

[sqlite] memory handling problems in 3.710 - 3.7.11

2012-03-26 Thread Laszlo Boszormenyi
Hi, On Debian and amd64 architecture SQLite3 has a severe problem. If I just start it, I can create a simple table like "create table a(b int);". However when I set "export MALLOC_CHECK_=1" then the mentioned table creation reports: *** glibc detected *** sqlite3: free(): invalid pointer:

[sqlite] SQLITE 3.7.11 Bug

2012-03-26 Thread David Holland
The SQLITE 3.7.11 shell does not allow user to repeat or edit entered commands with the arrow keys. David Holland dlh.holl...@gmail.com ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Re: [sqlite] How should I get the affected rows' ids

2012-03-26 Thread Igor Tandetnik
Wu Jian wrote: > then I exec a SQL like this UPDATE this_table SET data='abc' WHERE id > 2. > > OK. We all know that row 3 and row 4 was updated by my SQL. But how should > my program know that? What does your program need to know that for? What do you plan to do with this

[sqlite] How should I get the affected rows' ids

2012-03-26 Thread Wu Jian
Hi. Suppose I got a table with data like this: id (primary key)data(string) 1 test1 2 test2 3 hello 4 world then I exec a SQL like this UPDATE this_table SET data='abc' WHERE id > 2. After that,

Re: [sqlite] Concurrency violation: the UpdateCommand affected 0 of the expected 1 records

2012-03-26 Thread Joe Mistachkin
Agrawal, Manish wrote: > > 1. Database connection not valid for getting number of changes > At System.Data.SQLite.SQLiteConnection.get_Changes() > > 2. Database connection not valid for getting last insert rowid > At System.Data.SQLite.SQLiteConnection.get_LastInsertRowId() > > 3.

Re: [sqlite] how to export to html file?

2012-03-26 Thread Steinar Midtskogen
[YAN HONG YE] > my sqlite database want to export to html file, I know the command > sqlite3 -html film.db "select * from film;" > could show the table in cmd window, but how to export to the html file like > sqlite3 -html film.db mm.html "select * from film;" sqlite3 -html film.db "select