[sqlite] added new db with other journal mode. Any issue?

2012-11-13 Thread Durga D
Hi All, I have 8 sqlite databases with TRUNCATE journal mode. I have added new database with WAL journal mode. Now, 9 databases in my application. Will it give any database corruption? Regards, ___ sqlite-users mailing list sqlite-users@sqlite.org http

Re: [sqlite] inserting record datinto mutliple tables with a composite primary key

2012-11-13 Thread Keith Medcalf
> It looks like my insert syntax should be, > INSERT INTO Structure > VALUES(null,'phosphoserine','phosphoserine.mol',185073,856147,73543,25338,'C3 > H8NO6P',185.073); > > where using null for id invokes AUTOINCREMENT. Is this the right syntax for > sqlite? I have also seen versions of insert wher

Re: [sqlite] in memory to void *data (and back)

2012-11-13 Thread Gaspard Bucher
Hi Jay, Thanks for the reply. By looking at the code in demovfs: http://www.sqlite.org/src/doc/trunk/src/test_demovfs.c It seems that by adapting "demovfs" to use a growing buffer (the *aBuffer field), I do not even need to use the backup stuff: I can just use this adapted "memory" database

Re: [sqlite] light weight write barriers

2012-11-13 Thread Nico Williams
On Tue, Nov 13, 2012 at 11:40 AM, Alan Cox wrote: >> > Barriers are pretty much universal as you need them for power off ! >> >> I'm afraid, no storage (drives, if you like this term more) at the moment >> supports >> barriers and, as far as I know the storage history, has never supported. > > Th

Re: [sqlite] Accessing existing SQLite database using Eclipse

2012-11-13 Thread Simon Slavin
On 13 Nov 2012, at 6:14pm, Lavanya Ramanan wrote: > I would like to know how to access an already existing SQLite database > (say, in our web server) to view and add data to it ? I Googled it and > didn't get any clear picture. Do I need to install JDBC driver for doing > this ? You can use the

[sqlite] Accessing existing SQLite database using Eclipse

2012-11-13 Thread Lavanya Ramanan
Hello, I have created an android app in java using eclipse which creates a SQLite database and lets the user add data to it. I would like to know how to access an already existing SQLite database (say, in our web server) to view and add data to it ? I Googled it and didn't get any clear picture.

Re: [sqlite] VC++ and SQLite

2012-11-13 Thread noel.frankinet
Le 13/11/2012 15:52, Arbol One a écrit : yes I know the concept, there no benefit on today machine, especially for a .h that is not so huge. Not to recompile it again? You know, the concept of precompiled headres...? Genius might have limitations, but stupidity is no handicap Eat Kosher -

Re: [sqlite] light weight write barriers

2012-11-13 Thread Alan Cox
> > Barriers are pretty much universal as you need them for power off ! > > I'm afraid, no storage (drives, if you like this term more) at the moment > supports > barriers and, as far as I know the storage history, has never supported. The ATA cache flush is a write barrier, and given you have

Re: [sqlite] in memory to void *data (and back)

2012-11-13 Thread Jay A. Kreibich
On Tue, Nov 13, 2012 at 06:08:17PM +0100, Gaspard Bucher scratched on the wall: > Hi there ! > > I am trying to figure out how to dump an in-memory database to some data > pointer and back (from a void*data chunk to in-memory). The simplest solution > I can figure out right now is: > > A. sav

[sqlite] in memory to void *data (and back)

2012-11-13 Thread Gaspard Bucher
Hi there ! I am trying to figure out how to dump an in-memory database to some data pointer and back (from a void*data chunk to in-memory). The simplest solution I can figure out right now is: A. save to void*data 1. backup to file 2. read file ==> void*data 3. remove file B. load from void*

Re: [sqlite] VC++ and SQLite

2012-11-13 Thread John Drescher
On Tue, Nov 13, 2012 at 10:29 AM, Arbol One wrote: > Further inspection showed that there is a macro that is added, and not the > stdafx.h file name, the macro is > '%(PrecompiledHeaderFile);%(ForcedIncludeFiles)'. Nevertheless, VS10 still > complains with the following error: > fatal error C18

Re: [sqlite] VC++ and SQLite

2012-11-13 Thread Arbol One
Further inspection showed that there is a macro that is added, and not the stdafx.h file name, the macro is '%(PrecompiledHeaderFile);%(ForcedIncludeFiles)'. Nevertheless, VS10 still complains with the following error: fatal error C1853: 'Debug\vsSamiira.pch' precompiled header file is from a p

Re: [sqlite] VC++ and SQLite

2012-11-13 Thread Teg
Hello Arbol, There's nothing special about Stdafx.h or Stdafx.cpp. Even if you switch to a different compiler, they just compile with no PCH. You do have to create them if you're going to use them though. I typically copy them in from another project. I even use them in Linux projects because it's

Re: [sqlite] VC++ and SQLite

2012-11-13 Thread Arbol One
I used Borland when I was a student too and a little bit after I graduated, I used OWL once, what a mistake, soon after Borland dropped the ball on OWL; left me stranded. Ever since I use GNU and GTKmm, they appear to be much more stable than Borland. Microsoft is stable, no doubt, but too compl

Re: [sqlite] VC++ and SQLite

2012-11-13 Thread John Drescher
On Tue, Nov 13, 2012 at 8:51 AM, Arbol One wrote: > Following the advice of MSN: > Open the project's Property Pages dialog box. For details, see Setting Visual > C++ Project Properties. > Click the C/C++ folder. > Click the Advanced property page. > Modify the Force Includes property. > > and no

Re: [sqlite] VC++ and SQLite

2012-11-13 Thread Arjen Markus
On Tue, 13 Nov 2012 09:51:01 -0500 Arbol One wrote: Following the advice of MSN: Open the project's Property Pages dialog box. For details, see Setting Visual C++ Project Properties. Click the C/C++ folder. Click the Advanced property page. Modify the Force Includes property. and now my F

Re: [sqlite] VC++ and SQLite

2012-11-13 Thread Arbol One
Not to recompile it again? You know, the concept of precompiled headres...? Genius might have limitations, but stupidity is no handicap Eat Kosher -Original Message- From: sqlite-users-boun...@sqlite.org [mailto:sqlite-users-boun...@sqlite.org] On Behalf Of Noel Frankinet Sent: Tuesday,

Re: [sqlite] VC++ and SQLite

2012-11-13 Thread Arbol One
Following the advice of MSN: Open the project's Property Pages dialog box. For details, see Setting Visual C++ Project Properties. Click the C/C++ folder. Click the Advanced property page. Modify the Force Includes property. and now my Force Include property text entry box has the word: stdaf

Re: [sqlite] Importing CSV File Into Table

2012-11-13 Thread Tilsley, Jerry M.
Thanks all, that fixed my issue and all imported successfully. I knew I was doing something stupid, but wasn't sure. > -Original Message- > From: sqlite-users-boun...@sqlite.org [mailto:sqlite-users- > boun...@sqlite.org] On Behalf Of Swithun Crowe > Sent: Tuesday, November 13, 2012 9:23

Re: [sqlite] Importing CSV File Into Table

2012-11-13 Thread Clemens Ladisch
Tilsley, Jerry M. wrote: > sqlite> .import /csv/iv_codes.csv MasterChargeList; > Error: no such table: MasterChargeList; The internal commands of the sqlite3 command-line tool that begin with a period are not delimited with a semicolon, so the semicolon that you have entered is interpreted as part

Re: [sqlite] Importing CSV File Into Table

2012-11-13 Thread Swithun Crowe
Hello TJM> I am trying to import some data from a csv file to an existing table TJM> called MasterChargeList. But this is failing with the error that the TJM> table does not exist. This is on SQLite 3.6.4 (required to use this TJM> version). See below for details: TJM> sqlite> .import /csv/

Re: [sqlite] VC++ and SQLite

2012-11-13 Thread Noel Frankinet
why would you need stdafx.h for sqlite ? what is the added benefit ? On 13 November 2012 14:57, Michael Schlenker wrote: > Am 13.11.2012 14:33, schrieb Arbol One: > > I would also keep this feature, however, in the case of SQLite3 > > amalgamation, I am really confused. You know how we have to

Re: [sqlite] VC++ and SQLite

2012-11-13 Thread Michael Schlenker
Am 13.11.2012 14:33, schrieb Arbol One: > I would also keep this feature, however, in the case of SQLite3 > amalgamation, I am really confused. You know how we have to #include > the 'stdafx.h' in every declaration file (making it non-portable > code), i.e. .c, .cpp, etc., well, I tried doing the s

Re: [sqlite] VC++ and SQLite

2012-11-13 Thread Noel Frankinet
Never use stdafx stuff on open source project. Don't use precompiled header. On 13 November 2012 14:33, Arbol One wrote: > I would also keep this feature, however, in the case of SQLite3 > amalgamation, I am really confused. You know how we have to #include the > 'stdafx.h' in every declaration

Re: [sqlite] VC++ and SQLite

2012-11-13 Thread Arbol One
I would also keep this feature, however, in the case of SQLite3 amalgamation, I am really confused. You know how we have to #include the 'stdafx.h' in every declaration file (making it non-portable code), i.e. .c, .cpp, etc., well, I tried doing the same thing with sqlite.c, but VS10 complains a

[sqlite] Importing CSV File Into Table

2012-11-13 Thread Tilsley, Jerry M.
All, I am trying to import some data from a csv file to an existing table called MasterChargeList. But this is failing with the error that the table does not exist. This is on SQLite 3.6.4 (required to use this version). See below for details: sqlite> .mode csv sqlite> .schema CREATE TABLE

Re: [sqlite] inserting record datinto mutliple tables with a composite primary key

2012-11-13 Thread Igor Tandetnik
LMHmedchem wrote: > It looks like my insert syntax should be, > INSERT INTO Structure > VALUES(null,'phosphoserine','phosphoserine.mol',185073,856147,73543,25338,'C3H8NO6P',185.073); > > where using null for id invokes AUTOINCREMENT. Is this the right syntax for > sqlite? Yes, this would work. A

Re: [sqlite] light weight write barriers

2012-11-13 Thread Vladislav Bolkhovitin
杨苏立 Yang Su Li, on 11/10/2012 11:25 PM wrote: SATA's Native Command Queuing (NCQ) is not equivalent; this allows the drive to reorder requests (in particular read requests) so they can be serviced more efficiently, but it does *not* allow the OS to specify a partial, relative ordering of reques

Re: [sqlite] light weight write barriers

2012-11-13 Thread Vladislav Bolkhovitin
Richard Hipp, on 11/02/2012 08:24 AM wrote: SQLite cares. SQLite is an in-process, transaction, zero-configuration database that is estimated to be used by over 1 million distinct applications and to be have over 2 billion deployments. SQLite uses ordinary disk files in ordinary directories, of

Re: [sqlite] light weight write barriers

2012-11-13 Thread Vladislav Bolkhovitin
Alan Cox, on 11/02/2012 08:33 AM wrote: b) most drives will internally re-order requests anyway They will but only as permitted by the commands queued, so you have some control depending upon the interface capabilities. c) cheap drives won't support barriers Barriers are pretty muc

Re: [sqlite] light weight write barriers

2012-11-13 Thread Vladislav Bolkhovitin
Howard Chu, on 11/01/2012 08:38 PM wrote: Alan Cox wrote: How about that recently preliminary infrastructure to send ORDERED commands instead of queue draining was deleted from the kernel, because "there's no difference where to drain the queue, on the kernel or the storage side"? Send patche

Re: [sqlite] inserting record datinto mutliple tables with a composite primary key

2012-11-13 Thread LMHmedchem
Hello, I have made some progress. This is what my Structure table looks like now, CREATE TABLE Structure( 'id' INTEGER PRIMARY KEY AUTOINCREMENT, 'name' TEXT NOT NULL, 'filePath' TEXT NOT NULL, 'iH1' INTEGER NOT NULL, 'iH2' INTEGER NOT NULL, 'iH3' INTEGER NOT NULL, 'iH4' INTE