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

2012-03-25 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. Da

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

2012-03-25 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 *

[sqlite] how to export to html file?

2012-03-25 Thread 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;" Thank you! ___

Re: [sqlite] 64-bit Windows Command Shell

2012-03-25 Thread Roger Binns
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 25/03/12 08:44, Jay A. Kreibich wrote: > No, there wasn't. I'm saying the OS shouldn't cache blocks from > filesystems that reside on a ramdisk volume. We were talking at cross purposes. I was talking about the OPs issue and moving a database fr

Re: [sqlite] Handle multiple results using sqlite3_step

2012-03-25 Thread Simon Slavin
On 25 Mar 2012, at 8:44pm, Neo Anderson wrote: > It's just that the two resultsets are not related. What I thought was that I > could gain some performance by combining two SELECT into one statement and > execute it via one prepare/step. Ah. Now we understand. No, you can't. Almost all the

Re: [sqlite] Could/should Windows build of SQLite use #define

2012-03-25 Thread Roger Binns
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 25/03/12 11:28, Larry Brasfield wrote: > Please forgive a bit of skepticism here. Do you mean that the > amalgamation of sqlite3.c into apsw.c provides a 10% speed advantage? Yes. Effectively the point of APSW is to provide a Pythonic API, extrac

Re: [sqlite] Handle multiple results using sqlite3_step

2012-03-25 Thread Larry Brasfield
On Mar 25, Neo Anderson wrote: Do not be confused by the sample SQL statement. What I really wanted to do is return two different resultsets in one statement and wanted an API to handle the two resultsets. For example: select * form table1; select * from table2; And I do not want to use big u

Re: [sqlite] question about zipvfs & performance

2012-03-25 Thread Richard Hipp
On Sun, Mar 25, 2012 at 1:48 PM, Tal Tabakman wrote: > Hi, > I am writing an application that performs a lot of DB writes. I am using a > lot of recommended optimizations (like using transactions and more...) > I want to improve my recording time by reducing the amount of I/O. one way > to do so i

Re: [sqlite] Handle multiple results using sqlite3_step

2012-03-25 Thread Neo Anderson
It's just that the two resultsets are not related. What I thought was that I could gain some performance by combining two SELECT into one statement and execute it via one prepare/step. > From: petite.abei...@gmail.com > Date: Sun, 25 Mar 2012 21:40:40 +0200 > To: sqlite-users@sqlite.org > Subje

Re: [sqlite] Handle multiple results using sqlite3_step

2012-03-25 Thread Petite Abeille
On Mar 25, 2012, at 9:36 PM, Neo Anderson wrote: > And I do not want to use big union. Out of curiosity, why is that? SQLite goes to great length to support relational operations. Why not use them? ___ sqlite-users mailing list sqlite-users@sqlite.o

Re: [sqlite] Handle multiple results using sqlite3_step

2012-03-25 Thread Neo Anderson
Do not be confused by the sample SQL statement. What I really wanted to do is return two different resultsets in one statement and wanted an API to handle the two resultsets. For example: select * form table1; select * from table2; And I do not want to use big union. By reading other replies

Re: [sqlite] question about zipvfs & performance

2012-03-25 Thread Roger Binns
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 25/03/12 10:48, Tal Tabakman wrote: > I am evaluating a sqlite extension called zipvfs. http://www.hwaci.com/sw/sqlite/zipvfs.html for anyone else interested. > I assumed that database writing will be faster ... in reality I see no > difference

Re: [sqlite] NaN in, 0.0 out?

2012-03-25 Thread Jay A. Kreibich
On Sun, Mar 25, 2012 at 02:03:44PM -0400, Francis J. Monari, Esquire scratched on the wall: > All, > > Not to sound critical, but to be clear: using SQLite for IEEE > floating point will result in data "loss' unless precautions are > taken. Define "loss". SQLite, in general, is dependent on t

Re: [sqlite] question about zipvfs & performance

2012-03-25 Thread Valentin Davydov
On Sun, Mar 25, 2012 at 07:48:51PM +0200, Tal Tabakman wrote: > Hi, > I am writing an application that performs a lot of DB writes. I am using a > lot of recommended optimizations (like using transactions and more...) > I want to improve my recording time by reducing the amount of I/O. one way > to

Re: [sqlite] question about zipvfs & performance

2012-03-25 Thread Larry Brasfield
On March 25, Tal Tabakman wrote: Hi, I am writing an application that performs a lot of DB writes. I am using a lot of recommended optimizations (like using transactions and more...) I want to improve my recording time by reducing the amount of I/O. one way to do so is by compressing the data bef

Re: [sqlite] Could/should Windows build of SQLite use #define

2012-03-25 Thread Larry Brasfield
On March 24, Roger Binns wrote: [I am the author of APSW] Thanks for that, BTW. On 24/03/12 14:22, Larry Brasfield wrote: > Except for its clever hiding of SQLite's C API names (via "#define > SQLITE_API static"), There is nothing "clever" about it - SQLite exposes various things like that

Re: [sqlite] NaN in, 0.0 out?

2012-03-25 Thread Francis J. Monari, Esquire
All, Not to sound critical, but to be clear: using SQLite for IEEE floating point will result in data "loss' unless precautions are taken. Assuming my statement above is correct, then does a standard set of precautions exist? Frank. Francis J. Monari, Esquire McKernan, McKernan & Godino 1

[sqlite] question about zipvfs & performance

2012-03-25 Thread Tal Tabakman
Hi, I am writing an application that performs a lot of DB writes. I am using a lot of recommended optimizations (like using transactions and more...) I want to improve my recording time by reducing the amount of I/O. one way to do so is by compressing the data before dumping it to DISK. I am evalua

Re: [sqlite] Handle multiple results using sqlite3_step

2012-03-25 Thread Jay A. Kreibich
On Sun, Mar 25, 2012 at 06:10:14PM +0800, Neo Anderson scratched on the wall: > > Is it possible to handle multiple results using sqlite3_step or any > other API calls? sqlite3_exec() is the only API call that will process multiple SQL statements in a single call. Its use is somewhat discour

Re: [sqlite] NaN in, 0.0 out?

2012-03-25 Thread Jay A. Kreibich
On Sun, Mar 25, 2012 at 09:29:58AM -0400, Francis J. Monari, Esquire scratched on the wall: > How are +infinity and -infinity handled? Generally, they are treated like normal values. You can calculate, store, and retrieve an INF or -INF value using just SQL expressions. As with all cal

Re: [sqlite] 64-bit Windows Command Shell

2012-03-25 Thread Jay A. Kreibich
On Sat, Mar 24, 2012 at 09:53:47PM -0700, Roger Binns scratched on the wall: > Yes, but the tools primarily come from the OS vendor. After all they have > to be able to compile and debug the code making up the operating system > and base applications. Which makes it all the more disappointing

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

2012-03-25 Thread Agrawal, Manish
Debugging shows that the update statement generates the following 4 errors: http://www.ismlab.usf.edu/sqlite_errors.jpg 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 in

Re: [sqlite] NaN in, 0.0 out?

2012-03-25 Thread Francis J. Monari, Esquire
All, How are +infinity and -infinity handled? Frank. Simon Slavin wrote: 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 think this is the right choice. It is w

Re: [sqlite] Handle multiple results using sqlite3_step

2012-03-25 Thread Igor Tandetnik
Neo Anderson wrote: > Is it possible to handle multiple results using sqlite3_step or any other API > calls? > > I want to execute the following SQL in one statement and want to get the two > resultsets. > > select 1 a; select 2 b; No. In SQLite, each sqlite3_stmt* handle represents one resul

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

2012-03-25 Thread Agrawal, Manish
Hello I am getting this error when trying to update a database row in a C# application. The data set ds has been created using the standard Visual Studio/ System.Data.SQLite tools. The table definition is: CREATE TABLE "Test" ( "test_Id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL UN

Re: [sqlite] Handle multiple results using sqlite3_step

2012-03-25 Thread Kees Nuyt
On Sun, 25 Mar 2012 18:10:14 +0800, Neo Anderson wrote: > > Is it possible to handle multiple results using sqlite3_step or any other API > calls? > > I want to execute the following SQL in one statement and want to get the two > resultsets. > > select 1 a; select 2 b; (that doe not look like

[sqlite] Handle multiple results using sqlite3_step

2012-03-25 Thread Neo Anderson
Is it possible to handle multiple results using sqlite3_step or any other API calls? I want to execute the following SQL in one statement and want to get the two resultsets. select 1 a; select 2 b; ___ sqlit

Re: [sqlite] Possible bug? Primary key not created for CREATE TABLE(id INTEGER primary key);

2012-03-25 Thread Dan Kennedy
On 03/25/2012 02:07 PM, Neo Anderson wrote: See the following result: sqlite> select * from sqlite_master order by type; type|name|tbl_name|rootpage|sql index|sqlite_autoindex_t_1|t|4| index|sqlite_autoindex_t3_1|t3|7| table|t|t|2|CREATE TABLE t(id int primary key, key, value) table|t2|t2|5|CR

[sqlite] Possible bug? Primary key not created for CREATE TABLE(id INTEGER primary key);

2012-03-25 Thread Neo Anderson
See the following result: sqlite> select * from sqlite_master order by type; type|name|tbl_name|rootpage|sql index|sqlite_autoindex_t_1|t|4| index|sqlite_autoindex_t3_1|t3|7| table|t|t|2|CREATE TABLE t(id int primary key, key, value) table|t2|t2|5|CREATE TABLE t2(id INTEGER primary key, key, valu