Re: [sqlite] Creation and modification timestamps with insert or replace possible?

2011-03-10 Thread Simon Slavin
On 10 Mar 2011, at 7:57am, Mohd Radzi Ibrahim wrote: So, that's explain why my column ID INTEGER PRIMARY KEY, changes when I use REPLACE. I could not rely on the ID with this command. Yes. You explicitly said 'REPLACE' so that's what it's doing. If you want to modify an existing record

Re: [sqlite] memory usage after VACUUM

2011-03-10 Thread Philip Graham Willoughby
On 9 Mar 2011, at 15:23, Nick Hodapp wrote: I'm using sqlite in an iOS app, via the popular FMDB wrapper. My profiling tool is showing me that the app is using 2.5 MB of memory before a VACUUM, and nearly 6MB after. The tool shows that the extra memory was allocated by sqlite3MemMalloc().

Re: [sqlite] duplicate a prepared statement?

2011-03-10 Thread Philip Graham Willoughby
On 9 Mar 2011, at 21:29, Nick Hodapp wrote: Is it possible to duplicate a prepared statement? Yes, if the original statement used sqlite3_prepare_v2: DBrc = sqlite3_prepare_v2(db,sqlite3_sql(original),-1,duplicate,NULL); I have a need to run the same query multiple times with

[sqlite] sqlite :: calculating with dates: compare current date minus 6 months with stored record

2011-03-10 Thread Sven Aluoor
Hi folks I have a table with name, date in format DD.MM.. nameexpiry date example CA 04.05.2013 example Sub-CA 01.09.2012 I need to something like this (I try to explain in pseudo code) if SYSDATE (current date) minus 6 months $expiry date print OK else

Re: [sqlite] sqlite :: calculating with dates: compare current date minus 6 months with stored record

2011-03-10 Thread Igor Tandetnik
Sven Aluoor alu...@gmail.com wrote: I have a table with name, date in format DD.MM.. If at all possible, switch to one of the formats that SQLite date functions understand, e.g. -MM-DD - see http://www.sqlite.org/lang_datefunc.html . This format has the advantage that a simple string

[sqlite] Rowids, bit-arrays, recycling, and performance

2011-03-10 Thread Dave White
We are considering using rowids as a unique and stable ID for all records. I know that in order to do this, we need to prevent recycling by using primary key autoincrement. The concern is that over time, as records are added and removed, there will appear large gaps in the rowids of a table.

Re: [sqlite] Rowids, bit-arrays, recycling, and performance

2011-03-10 Thread Richard Hipp
On Thu, Mar 10, 2011 at 10:31 AM, Dave White dwh...@companioncorp.comwrote: We are considering using rowids as a unique and stable ID for all records. I know that in order to do this, we need to prevent recycling by using primary key autoincrement. The concern is that over time, as records

Re: [sqlite] Rowids, bit-arrays, recycling, and performance

2011-03-10 Thread Simon Slavin
On 10 Mar 2011, at 3:31pm, Dave White wrote: 1. Do I understand this correctly? Not for SQLite. It doesn't do keying arrays so don't worry about gaps in arrays or anything like that. 2. If necessary, I can manually recycle rowids to fill in these gaps, and maintain a separate

[sqlite] sqlite3_open16 and flags

2011-03-10 Thread Alexander Spence
How would I open a database connection using UTF-16 but still be able to specify flags. Seems like there would be a sqlite3_open16_v2 but there's not. Please NOTE: This electronic message, including any attachments, may include privileged, confidential and/or

[sqlite] Location of net 4.0 System.Data.SQLite driver release.

2011-03-10 Thread Bob PS Watson
Hello, I'm trying to find the location of the release for the .net 4.0 System.Data.SQLite driver. I've searched this site, http://system.data.sqlite.org/index.html/doc/trunk/www/index.wiki but found nothing, pertaining to the where the code is hosted. That's assuming of course, that

Re: [sqlite] sqlite3_open16 and flags

2011-03-10 Thread Roger Binns
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 03/10/2011 09:44 AM, Alexander Spence wrote: How would I open a database connection using UTF-16 but still be able to specify flags. Seems like there would be a sqlite3_open16_v2 but there's not. Indeed. If you look at the code for

Re: [sqlite] duplicate a prepared statement?

2011-03-10 Thread Jay A. Kreibich
On Thu, Mar 10, 2011 at 11:33:28AM +, Philip Graham Willoughby scratched on the wall: On 9 Mar 2011, at 21:29, Nick Hodapp wrote: Is it possible to duplicate a prepared statement? Yes, if the original statement used sqlite3_prepare_v2: DBrc =

Re: [sqlite] Rowids, bit-arrays, recycling, and performance

2011-03-10 Thread Jay A. Kreibich
On Thu, Mar 10, 2011 at 10:37:14AM -0500, Richard Hipp scratched on the wall: On Thu, Mar 10, 2011 at 10:31 AM, Dave White dwh...@companioncorp.comwrote: 1. Do I understand this correctly? No. I think you may be confusing SQLite and PostgreSQL. And even PostgreSQL compresses the

Re: [sqlite] Rowids, bit-arrays, recycling, and performance

2011-03-10 Thread Richard Hipp
On Thu, Mar 10, 2011 at 11:01 AM, Jay A. Kreibich j...@kreibi.ch wrote: On Thu, Mar 10, 2011 at 10:37:14AM -0500, Richard Hipp scratched on the wall: On Thu, Mar 10, 2011 at 10:31 AM, Dave White dwh...@companioncorp.com wrote: 1. Do I understand this correctly? No. I think

[sqlite] .import FILE TABLE

2011-03-10 Thread jciliberti
Hello, Unbelievably active user group! I have been unable to import a CSV text file from MS Access to sqlite: 1. Created a small table (3 fields and 1 record) in Access and exported it to a CSV text file named myCSVfile.txt 2. Transferred from PC to Mac. Opened file myCSVfile.txt

Re: [sqlite] .import FILE TABLE

2011-03-10 Thread Jim Morris
Make sure your separator is the , http://www.sqlite.org/sqlite.html On 3/10/2011 12:28 PM, jcilibe...@comcast.net wrote: Hello, Unbelievably active user group! I have been unable to import a CSV text file from MS Access to sqlite: 1. Created a small table (3 fields and 1 record) in Access

Re: [sqlite] .import FILE TABLE

2011-03-10 Thread Gerry Snyder
On 3/10/2011 1:28 PM, jcilibe...@comcast.net wrote: Hello, Unbelievably active user group! I have been unable to import a CSV text file from MS Access to sqlite: 1. Created a small table (3 fields and 1 record) in Access and exported it to a CSV text file named myCSVfile.txt 2.

Re: [sqlite] .import FILE TABLE

2011-03-10 Thread jciliberti
Thanks, but doesn't seem to work: I used command - Original Message - From: Gerry Snyder mesmerizer...@gmail.com To: General Discussion of SQLite Database sqlite-users@sqlite.org Sent: Thursday, March 10, 2011 12:39:33 PM Subject: Re: [sqlite] .import FILE TABLE On 3/10/2011

Re: [sqlite] .import FILE TABLE

2011-03-10 Thread Jim Morris
.separator , .import myPath/myCSVfile myTable We use a import file with these commands. On 3/10/2011 2:32 PM, jcilibe...@comcast.net wrote: Thanks, but doesn't seem to work: I used command - Original Message - From: Gerry Snydermesmerizer...@gmail.com To: General Discussion of