Re: [sqlite] Sqlite testing

2009-09-22 Thread Roger Binns
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 ydlu wrote: > I am Windows CE software developer, so I am really, really want to learn how > you built and test "sqlite3.exe" in Windows CE platform. so I can run a > console command line in Windows CE enivroment. http://www.sqlite.org/testing.html

Re: [sqlite] Sqlite testing

2009-09-22 Thread ydlu
Hi: I am Windows CE software developer, so I am really, really want to learn how you built and test "sqlite3.exe" in Windows CE platform. so I can run a console command line in Windows CE enivroment. thanks Lu On Thu, Sep 17, 2009 at 6:58 AM, D. Richard Hipp wrote: > > On Sep

Re: [sqlite] Strange File Import Error

2009-09-22 Thread Mohit Sindhwani
Stephan Wehner wrote: > On Tue, Sep 22, 2009 at 3:04 PM, Simon Slavin > wrote: > >> On 22 Sep 2009, at 10:49pm, Simon Davies wrote: >> >> If you're going to need to import such files frequently, you might >> need to write some code to do the import properly. >>

Re: [sqlite] Inserting into an empty table

2009-09-22 Thread Roger Binns
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Barton Torbert wrote: > I am having problems inserting a record into a table that is empty. I get > back an error. Is there any special issues involving this? http://catb.org/~esr/faqs/smart-questions.html

[sqlite] Inserting into an empty table

2009-09-22 Thread Barton Torbert
I am having problems inserting a record into a table that is empty. I get back an error. Is there any special issues involving this? Bart ___ sqlite-users mailing list sqlite-users@sqlite.org

Re: [sqlite] Strange File Import Error

2009-09-22 Thread Stephan Wehner
On Tue, Sep 22, 2009 at 3:04 PM, Simon Slavin wrote: > > On 22 Sep 2009, at 10:49pm, Simon Davies wrote: > > If you're going to need to import such files frequently, you might > need to write some code to do the import properly. Hey there, Its not necessarily

Re: [sqlite] Strange File Import Error

2009-09-22 Thread Rich Shepard
On Wed, 23 Sep 2009, Simon Davies wrote: > You seem to have translated one of your data commas into a separator pipe: > "Stormwater; NPDES Construction More Than 1 Acre Disturbed Ground, Issued > By Agent" > -> > Stormwater; NPDES Construction More Than 1 Acre Disturbed Ground|Issued By > Agent

Re: [sqlite] Strange File Import Error

2009-09-22 Thread Guy Hachlili
Arr, let's count. Column 1: 117172 Column 2: Engineered Structures Inc. Column 3: Brockway Center Column 4: 10875 SW Herman Rd Column 5: Tualatin Column 6: 97062-8033 Column 7: Washington Column 8: NWR Column 9: 45.3834 Column 10: -122.7882 Column 11: 1542 Column 12: Nonresidential Construct NEC

Re: [sqlite] Strange File Import Error

2009-09-22 Thread Simon Davies
2009/9/22 Rich Shepard : > On Tue, 22 Sep 2009, Simon Davies wrote: > >>> 117172|Engineered Structures Inc.|Brockway Center|10875 SW Herman >>> Rd|Tualatin|97062-8033|Washington|NWR|45.3834|-122.7882|1542|Nonresidential >>> Construct NEC|Gen12c(Agent)|Stormwater; NPDES

Re: [sqlite] Strange File Import Error

2009-09-22 Thread Rich Shepard
On Tue, 22 Sep 2009, Simon Davies wrote: >> 117172|Engineered Structures Inc.|Brockway Center|10875 SW Herman >> Rd|Tualatin|97062-8033|Washington|NWR|45.3834|-122.7882|1542|Nonresidential >> Construct NEC|Gen12c(Agent)|Stormwater; NPDES Construction More Than 1 Acre >> Disturbed Ground|Issued By

Re: [sqlite] Strange File Import Error

2009-09-22 Thread Simon Davies
2009/9/22 Rich Shepard : > On Tue, 22 Sep 2009, Simon Davies wrote: > >> Remove the trailing pipe character > >   Did that as soon as I learned it made no difference. Each line should be > clean and there are 25 columns defined in it. Quite frustrating. >

Re: [sqlite] Strange File Import Error

2009-09-22 Thread Rich Shepard
On Tue, 22 Sep 2009, Simon Davies wrote: > Remove the trailing pipe character Did that as soon as I learned it made no difference. Each line should be clean and there are 25 columns defined in it. Quite frustrating. Rich ___ sqlite-users mailing

Re: [sqlite] Strange File Import Error

2009-09-22 Thread Simon Davies
2009/9/22 Rich Shepard : > On Tue, 22 Sep 2009, Simon Slavin wrote: > >> Use a text editor on the file and change all occurrences of (including the >> quotes) >> >> "," >> >> to >> >> "|" >> >> then set .separator to the single character | before you import the >> file. >

Re: [sqlite] Strange File Import Error

2009-09-22 Thread Rich Shepard
On Tue, 22 Sep 2009, Simon Slavin wrote: > Use a text editor on the file and change all occurrences of (including the > quotes) > > "," > > to > > "|" > > then set .separator to the single character | before you import the > file. Simon, The default separator is '|' (as confirmed by the

Re: [sqlite] Strange File Import Error

2009-09-22 Thread Simon Slavin
On 22 Sep 2009, at 10:49pm, Simon Davies wrote: > You can use .separator to specify pipe (or any other character of > choice) as the field separator for .import > > Your separator needs to be a character that does not appear anywhere > in your data Fast hack if you need to do this only once:

Re: [sqlite] cannot add data to sql tables

2009-09-22 Thread Hoover, Jeffrey
Could you be omitting the database commit? Try adding an explicit commit after your inserts. -Original Message- From: sqlite-users-boun...@sqlite.org [mailto:sqlite-users-boun...@sqlite.org] On Behalf Of Kavita Raghunathan Sent: Tuesday, September 22, 2009 5:59 PM To: sqlite-users

Re: [sqlite] Strange File Import Error

2009-09-22 Thread Rich Shepard
On Tue, 22 Sep 2009, Pavel Ivanov wrote: > AFAIK, you can do only the first - remove all quotes and make sure that no > commas met in field values. Pavel, I've just tried this and the command line processor still finds 26 columns instead of the counted 25. Sigh. Thanks, Rich

[sqlite] cannot add data to sql tables

2009-09-22 Thread Kavita Raghunathan
Hi, I successfully did the following using C wrappers: 1) created a .db file 2) Added the tables 3) Try to insert data into the tables created. When I try to 3) insert data into the tables, all the routines pass (Prepare, Step, Finalize) without errors. But when I run my .db file

Re: [sqlite] Strange File Import Error

2009-09-22 Thread Simon Davies
2009/9/22 Pavel Ivanov : >>   If I understand correctly, I can remove all quotes as long as the only >> commas delineate columns. Or, I can use the pipe as a separator and remove >> all quotes, too. Correct? > > AFAIK, you can do only the first - remove all quotes and make sure

Re: [sqlite] Strange File Import Error

2009-09-22 Thread Pavel Ivanov
> If I understand correctly, I can remove all quotes as long as the only > commas delineate columns. Or, I can use the pipe as a separator and remove > all quotes, too. Correct? AFAIK, you can do only the first - remove all quotes and make sure that no commas met in field values. Pavel On

Re: [sqlite] SQL language question

2009-09-22 Thread Simon Slavin
On 22 Sep 2009, at 9:45pm, D. Richard Hipp wrote: > The question is this: Should the no-op UPDATE statement (x=x) cause > the ON UPDATE SET NULL foreign key constraint to set t2.y to NULL or > not? You would surely need agreement with the result of sqlite3_changes(), right ? CREATE TABLE

Re: [sqlite] Strange File Import Error

2009-09-22 Thread Rich Shepard
On Tue, 22 Sep 2009, Pavel Ivanov wrote: > No, the problem is that sqlite3 command line utility doesn't parse quotes > in csv files. It gets line, splits it using comma as delimiter, > disregarding any quotes and then inserts resulting strings into database. > So you'll have to use something else

Re: [sqlite] Strange File Import Error

2009-09-22 Thread Pavel Ivanov
> Sure. I think the issue is that the file uses double quotation marks > rather than single ones. But, in that case, how do I mark an embedded > apostrophe? No, the problem is that sqlite3 command line utility doesn't parse quotes in csv files. It gets line, splits it using comma as delimiter,

Re: [sqlite] SQLite database on a certain high-performance "SSD"

2009-09-22 Thread Thomas Briggs
Is the sync necessary to commit a transaction slow? Performance of that sync depends on the OS, file system, hardwar, etc. IIRC, so IOs may be fast but it's possible that the syncs are killing you. -T On Tue, Sep 22, 2009 at 5:14 PM, Mark wrote: > Lothar Scholz wrote:

Re: [sqlite] Strange File Import Error

2009-09-22 Thread Rich Shepard
On Tue, 22 Sep 2009, Pavel Ivanov wrote: > Could you show us this line 1? Pavel, Sure. I think the issue is that the file uses double quotation marks rather than single ones. But, in that case, how do I mark an embedded apostrophe? Line 1: "117172","Engineered Structures, Inc.","Brockway

Re: [sqlite] SQLite database on a certain high-performance "SSD"

2009-09-22 Thread Mark
Lothar Scholz wrote: > Hello Mark, > > Tuesday, September 22, 2009, 3:53:48 AM, you wrote: > > M> I've currently got a loaner high-performance flash-based "SSD" (let's > M> just say it doesn't connect to any disk controllers) that I'm testing > M> for performance. I've run my application

Re: [sqlite] SQLite database on a certain high-performance "SSD"

2009-09-22 Thread Mark
Simon Slavin wrote: > On 22 Sep 2009, at 3:07pm, Ken wrote: > >> How is the SSD connected? Could it be an issue with the transport >> layer to the device? > > Also, do you have a storage driver that /knows/ its talking to an > SSD ? Because some operating systems do all sorts of clever

Re: [sqlite] Strange File Import Error

2009-09-22 Thread Pavel Ivanov
> sqlite> .import all-deq-contacts-fixed.csv Permits > all-deq-contacts-fixed.csv line 1: expected 25 columns of data but found 29 Could you show us this line 1? Pavel On Tue, Sep 22, 2009 at 5:05 PM, Rich Shepard wrote: >   I've downloaded data in .csv format from an

Re: [sqlite] SQL language question

2009-09-22 Thread Swithun Crowe
Hello DRH The question is this: Should the no-op UPDATE statement (x=x) cause DRH the ON UPDATE SET NULL foreign key constraint to set t2.y to NULL or DRH not? I think MySQL knows if a row gets actually updated. If the values in a row don't change, then it says that no rows were updated. I

Re: [sqlite] SQL language question

2009-09-22 Thread Igor Tandetnik
D. Richard Hipp wrote: > Consider the following SQL: > > CREATE TABLE t1(x integer); > INSERT INTO t1 VALUES(123); > CREATE TABLE t2(y integer REFERENCES t1 ON UPDATE SET NULL); > INSERT INTO t2 VALUES(123); > > UPDATE t1 SET x=x; -- key line: Is this

[sqlite] Strange File Import Error

2009-09-22 Thread Rich Shepard
I've downloaded data in .csv format from an agency's Web site and want to put it in a sqlite database. I created the table as a .sql file and read that into sqlite. It's fine. However, when I try to import the csv file sqlite balks: sqlite> .import all-deq-contacts-fixed.csv Permits

Re: [sqlite] SQL language question

2009-09-22 Thread Rich Shepard
On Tue, 22 Sep 2009, D. Richard Hipp wrote: > The question is this: Should the no-op UPDATE statement (x=x) cause the > ON UPDATE SET NULL foreign key constraint to set t2.y to NULL or not? > > PostgreSQL says "no" - the t2.y value is not nulled unless the t1.x > value really does change values.

[sqlite] SQL language question

2009-09-22 Thread D. Richard Hipp
Consider the following SQL: CREATE TABLE t1(x integer); INSERT INTO t1 VALUES(123); CREATE TABLE t2(y integer REFERENCES t1 ON UPDATE SET NULL); INSERT INTO t2 VALUES(123); UPDATE t1 SET x=x; -- key line: Is this considered an "update" of t1.x? SELECT * FROM

Re: [sqlite] SQLite database on a certain high-performance "SSD"

2009-09-22 Thread Lothar Scholz
Hello Mark, Tuesday, September 22, 2009, 3:53:48 AM, you wrote: M> I've currently got a loaner high-performance flash-based "SSD" (let's M> just say it doesn't connect to any disk controllers) that I'm testing M> for performance. I've run my application against it, and I believe that M> I

[sqlite] Compiling SQLite on Windows from the basic sources

2009-09-22 Thread Eli
The preferred and recommended way of compiling SQLite on Windows is using the single .C "amalgamation" file. However, this isn't a suitable method when I want to tinker with the source code of SQLite and compile it to see the effects. The single .C file isn't convenient for development. I

Re: [sqlite] Most wanted features of SQLite ?

2009-09-22 Thread John Stanton
P Kishor wrote: > On Sat, Sep 19, 2009 at 9:21 AM, John Stanton wrote: >> Alexey Pechnikov wrote: >>> Hello! >>> >>> On Saturday 19 September 2009 00:43:18 Noah Hart wrote: >>> Stored Procedures >>> There are Tiny C compiler extension and realization of >>> stored

Re: [sqlite] cygwin and sqlite

2009-09-22 Thread Jim Showalter
The original idea of the i86 segmented architecture was that OSs would be written that created zillions of bite-sized threads, each with its own small address space. Nobody wrote an OS to take advantage of that, and instead the ridiculous "far pointer" was invented to desegment the

Re: [sqlite] Most wanted features of SQLite ?

2009-09-22 Thread John Stanton
Alexey Pechnikov wrote: > Hello! > > On Saturday 19 September 2009 18:21:22 John Stanton wrote: >> There is a PL/SQL implementation available and we use Javascript as a >> stored procedure capability in Sqlite. It integrates nicely with WWW >> applications. > > I don't know this. Can you show

Re: [sqlite] Update vs Insert

2009-09-22 Thread Jay A. Kreibich
On Tue, Sep 22, 2009 at 11:31:16AM -0500, logan.rat...@emerson.com scratched on the wall: > > I am having problems with the update command (through the interface > > library). In most databases if you issue an update to a record that > > does not exist, it simply adds a new record. When I try

Re: [sqlite] cygwin and sqlite

2009-09-22 Thread Jay A. Kreibich
On Tue, Sep 22, 2009 at 01:37:38PM -0400, Pavel Ivanov scratched on the wall: > Wow Jim, you're asking to rewrite the whole code of cygwin. You > want all sorts of programs (like sed, awk, expr etc) to suddenly > become a part of one program and the code of bash to be rewritten from > scratch

Re: [sqlite] cygwin and sqlite

2009-09-22 Thread Beau Wilkinson
>The point I was trying to make is that the majority of commands cygwin >supports don't have to do any forking. They could just be method >calls. Pipes would be parameters going in and return values coming >out, all running in a single process. If fork() is specifically called >in a script, then

Re: [sqlite] how to compile SQlite 3.3.18 in visual studio 2008 ?

2009-09-22 Thread Teg
Hello Atul_Vaidya, Tuesday, September 22, 2009, 7:08:29 AM, you wrote: A> Hi, A>I want a statically linked SQlite Library connected to my application.I A> am using Visual Studio 2008.I created my own version using the three files A> as sqlite3.h,sqlite3.c and sqlite3ext.h.It does creates a

Re: [sqlite] cygwin and sqlite

2009-09-22 Thread Pavel Ivanov
Wow Jim, you're asking to rewrite the whole code of cygwin. You want all sorts of programs (like sed, awk, expr etc) to suddenly become a part of one program and the code of bash to be rewritten from scratch so that it never forks itself into new process but still implements all features that

Re: [sqlite] cygwin and sqlite

2009-09-22 Thread Jim Showalter
The point I was trying to make is that the majority of commands cygwin supports don't have to do any forking. They could just be method calls. Pipes would be parameters going in and return values coming out, all running in a single process. If fork() is specifically called in a script, then

Re: [sqlite] Update vs Insert

2009-09-22 Thread Simon Slavin
On 22 Sep 2009, at 5:06pm, Barton Torbert wrote: > I am having problems with the update command (through the interface > library). Which interface library ? The sqlite3_ C calls ? Or a library or API for some other language ? > In most databases if you issue an update to a record that

Re: [sqlite] SQLite database on a certain high-performance "SSD"

2009-09-22 Thread Simon Slavin
On 22 Sep 2009, at 3:07pm, Ken wrote: > How is the SSD connected? Could it be an issue with the transport > layer to the device? Also, do you have a storage driver that /knows/ its talking to an SSD ? Because some operating systems do all sorts of clever stuff (write-queueing, read-ahead

Re: [sqlite] Update vs Insert

2009-09-22 Thread Logan.Ratner
>You can't do that with an 'update' but you can with 'insert or replace.' >This is true in any SQL driven database, not just SQL. (Er, that should read 'not just SQLite.') Logan Ratner | Software Engineer | Gas Chromatographs Emerson Process Management | 5650 Brittmoore Rd | Houston | TX | 77041

Re: [sqlite] Update vs Insert

2009-09-22 Thread Logan.Ratner
>From: sqlite-users-boun...@sqlite.org [mailto:sqlite-users->boun...@sqlite.org] On Behalf Of Barton Torbert >Sent: Tuesday, September 22, 2009 11:07 AM >To: General Discussion of SQLite Database >Subject: [sqlite] Update vs Insert > >Hello, > >I am having problems with the update command (through

Re: [sqlite] Update vs Insert

2009-09-22 Thread Igor Tandetnik
Barton Torbert wrote: > I am having problems with the update command (through the interface > library). In most databases if you issue an update to a record that > does not exist, it simply adds a new record. No database I've ever heard of does that. It must be a feature

[sqlite] Update vs Insert

2009-09-22 Thread Barton Torbert
Hello, I am having problems with the update command (through the interface library). In most databases if you issue an update to a record that does not exist, it simply adds a new record. When I try this in SQLite I get an error back. Is the SQLite update restricted to a record you know

Re: [sqlite] Why are allowed to keep a text of 3 characters in a field that has been set to 2?

2009-09-22 Thread P Kishor
On Tue, Sep 22, 2009 at 8:39 AM, Angus March wrote: > P Kishor wrote: >> On Mon, Sep 21, 2009 at 5:10 PM, Guillermo Varona Silupú >> wrote: >> >>> Hi >>> In these SQL commands: >>> >>> CREATE TABLE "test" ("code" char(2)); >>> INSERT INTO test (code)

Re: [sqlite] cygwin and sqlite

2009-09-22 Thread Jay A. Kreibich
On Tue, Sep 22, 2009 at 09:58:43AM -0400, Pavel Ivanov scratched on the wall: > Just a simple fact: you execute > some code that uses memory in some way then you call fork() on Unix > and you already have 2 absolutely different processes that can access > the same data in memory. Copy of the

Re: [sqlite] Date comparisons

2009-09-22 Thread D. Richard Hipp
On Sep 22, 2009, at 10:33 AM, Barton Torbert wrote: > I guess there are kinks in how SQLite handles date comparisons. > Kinks? SQLite does not do date comparison. At all. SQLite has no knowledge of a "DATE" type. SQLite compares numeric values and/or strings. If you format your dates

Re: [sqlite] Date comparisons

2009-09-22 Thread Barton Torbert
Thanks. I can make this work as desired. Bart From: sqlite-users-boun...@sqlite.org on behalf of Igor Tandetnik Sent: Mon 9/21/2009 9:09 PM To: sqlite-users@sqlite.org Subject: Re: [sqlite] Date comparisons Barton Torbert wrote: > What you suggested sort

Re: [sqlite] Date comparisons

2009-09-22 Thread Barton Torbert
Very true. I just can not make the time math work any other way. I guess there are kinks in how SQLite handles date comparisons. Bart From: sqlite-users-boun...@sqlite.org on behalf of Igor Tandetnik Sent: Mon 9/21/2009 9:11 PM To: sqlite-users@sqlite.org

Re: [sqlite] SQLite database on a certain high-performance "SSD"

2009-09-22 Thread Ken
How is the SSD connected? Could it be an issue with the transport layer to the device? --- On Mon, 9/21/09, Dave Toll wrote: > From: Dave Toll > Subject: Re: [sqlite] SQLite database on a certain high-performance "SSD" > To: "General Discussion of

Re: [sqlite] cygwin and sqlite

2009-09-22 Thread Pavel Ivanov
> But after all these years I wonder why they don't fix the fork problem? > MacOS runs on Intel processors. Windows runs on Intel processors. Surely > they could learn how it *should* be done by studying things like the > Open Source Java code? You seem to forget the basics. It's not the

Re: [sqlite] Why are allowed to keep a text of 3 characters in a field that has been set to 2?

2009-09-22 Thread Ribeiro, Glauber
-Original Message- From: sqlite-users-boun...@sqlite.org [mailto:sqlite-users-boun...@sqlite.org] On Behalf Of Angus March Sent: Tuesday, September 22, 2009 8:40 AM To: General Discussion of SQLite Database Subject: Re: [sqlite] Why are allowed to keep a text of 3 characters in a field

Re: [sqlite] Why are allowed to keep a text of 3 characters in a field that has been set to 2?

2009-09-22 Thread Angus March
P Kishor wrote: > On Mon, Sep 21, 2009 at 5:10 PM, Guillermo Varona Silupú > wrote: > >> Hi >> In these SQL commands: >> >> CREATE TABLE "test" ("code" char(2)); >> INSERT INTO test (code) VALUES("123") >> >> Why are allowed to keep a text of 3 characters in a field that

[sqlite] how to use sqlite 3.6.18 in visual studio 2008 ?

2009-09-22 Thread Atul_Vaidya
Hi, I want a statically linked SQlite Library connected to my application.I am using Visual Studio 2008.I created my own version using the three files as sqlite3.h,sqlite3.c and sqlite3ext.h.It does creates a Lib file,and i am getting it linked in to my application, however when i try to make

Re: [sqlite] SQLite Suitability for Shopping Cart

2009-09-22 Thread Sebastian Bermudez
No ! use mysql that Concurrency on sqlite have high depend... from HW. (sqlite handles transaction one at time !)... 100 Concurrent Tx. (5 sec. each one)...the last pooled user must to wait 500 sec... to complete --- El mar 22-sep-09, CityDev escribió: > De:

[sqlite] how to compile SQlite 3.3.18 in visual studio 2008 ?

2009-09-22 Thread Atul_Vaidya
Hi, I want a statically linked SQlite Library connected to my application.I am using Visual Studio 2008.I created my own version using the three files as sqlite3.h,sqlite3.c and sqlite3ext.h.It does creates a Lib file,and i am getting it linked in to my application, however when i try to make

Re: [sqlite] List of active savepoints names

2009-09-22 Thread Roger Binns
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Lukas Gebauer wrote: > You must be very unhappy about current existence of > sqlite3_get_autocommit function, right? You said, by the way: "It is > not needed, if you organize your code well." :D It is the same case! Personally I don't use it since

Re: [sqlite] List of active savepoints names

2009-09-22 Thread Dan Kennedy
On Sep 22, 2009, at 2:38 PM, Lukas Gebauer wrote: >> A simple rule of thumb is to look at how useful features would be to >> other SQLite users. Note that you are the only one to have asked for >> this feature and not one other person has agreed with you on its >> need! >> The responses have

Re: [sqlite] List of active savepoints names

2009-09-22 Thread Lukas Gebauer
> A simple rule of thumb is to look at how useful features would be to > other SQLite users. Note that you are the only one to have asked for > this feature and not one other person has agreed with you on its need! > The responses have generally been along the lines of suggesting you > organize

[sqlite] SQLite Suitability for Shopping Cart

2009-09-22 Thread CityDev
I am building a shopping cart application that calls a web service which provides lists of documents and the documents themselves. The user purchases document images. The application will load lists into a database, then build pages from the stored lists. The database will also keep track of