Re: [sqlite] System.Data.SQLite, Linq, multithread and transaction usage

2012-07-23 Thread Bernhard Mogens Ege
Hmm the documentation doesn't explain how I should proceed with an entity object. Is it enough to close the connection in the entity object and let the framework open/close the connection for me? In constructor: MyEntities myEntities = new MyEntities(connectionString); In each

[sqlite] Compiling System.Data.SQLite with latest sqlite3.dll

2012-07-23 Thread Bernhard Mogens Ege
I am trying to figure out how to compile System.Data.SQLite and in the process update sqlite from 3.7.12.1 to 3.7.13 as I need the shared cache option for memory connections. And when I write 'trying' I am having trouble figuring out where exactly System.Data.SQLite picks up sqlite3.dll from.

Re: [sqlite] single gdbconn object with multiple threads.

2012-07-23 Thread Igor Tandetnik
Durga D durga.d...@gmail.com wrote: I have used same gdbconn for all the threads. In my sample application, it working perfectly in wal mode. Is it correct approach? Approach to what? You've never stated the problem you are trying to solve. With this setup, you don't get any concurrency

[sqlite] A matter of UNIQUEness

2012-07-23 Thread Arbol One
When using the statement 'UNIQUE INTEGER val', does SQLite3 automatically create a unique integer value for the transaction or would it only ascertain the uniqueness within that column? i.e.: Glib::ustring sql_param_tblName = CREATE TABLE name(n_id INTEGER PRIMARY KEY, title TEXT, fname

Re: [sqlite] A matter of UNIQUEness

2012-07-23 Thread Cory Nelson
On Mon, Jul 23, 2012 at 8:35 AM, Arbol One arbol...@gmail.com wrote: When using the statement 'UNIQUE INTEGER val', does SQLite3 automatically create a unique integer value for the transaction or would it only ascertain the uniqueness within that column? i.e.: Glib::ustring

Re: [sqlite] A matter of UNIQUEness

2012-07-23 Thread Igor Tandetnik
Arbol One arbol...@gmail.com wrote: When using the statement 'UNIQUE INTEGER val', does SQLite3 automatically create a unique integer value for the transaction or would it only ascertain the uniqueness within that column? i.e.: Glib::ustring sql_param_tblName = CREATE TABLE name(n_id

Re: [sqlite] single gdbconn object with multiple threads.

2012-07-23 Thread Durga D
Hi Igor, Sorry. Unless your threads do something else in parallel, you could just as well do all SQLite work on a single thread doubt: all are parallel threads. started at same time. one thread is writing and others are reading at the same time by using same sqlite3*. I passed same sqlite3* as

Re: [sqlite] single gdbconn object with multiple threads.

2012-07-23 Thread Simon Slavin
On 23 Jul 2012, at 3:30pm, Durga D durga.d...@gmail.com wrote: my main doubt is: same sqlite3* is passing to 4 threads from the primary thread. My understanding is that this does not happen. There is no concept of 'server' and 'client' in the SQLite API, and it does no thread or process

[sqlite] Free speech. Was: A matter of UNIQUEness

2012-07-23 Thread Richard Hipp
On Mon, Jul 23, 2012 at 9:35 AM, Arbol One arbol...@gmail.com wrote: Freedom of speech does not translate to freedom of insulting The statement above is a common sophistry that should not go unchallenged: The whole point of freedom of speech is so that you can say things that are

Re: [sqlite] Email Policy Violation - Free speech. Was: A matter of UNIQUEness

2012-07-23 Thread Richard Hipp
The irony in the automated response below is beyond words. :-) On Mon, Jul 23, 2012 at 11:14 AM, hj-smtp...@persistent.co.in wrote: You attempted to send a message [sqlite] Free speech. Was: A matter of UNIQUEness that contained objectionable words which violates Persistent System's Email

[sqlite] SQLite Shell Bug, Ignores Separators in Quotes Sometimes When Importing Data

2012-07-23 Thread Hayes, Michael - IS
I've got input data that uses double quotes to mean inches. So I have records with a single double quote character in a record. In some cases, SQLite is ignoring separators that are after the quotes. The documentation says that the separator will be honored even inside of quotes. (The

[sqlite] Tests fail with some glibc malloc/realloc/free-related warnings on Mageia Linux 3/Cauldron with glibc-2.16-2.mga3

2012-07-23 Thread Shlomi Fish
Hi all, I'm using svn and sqlite3 on Mageia Linux 3/Cauldron with glibc-2.16-2.mga3. today I noticed that svn checkout gave me the following by default: shlomif@telaviv1:~$ svn co http://rpmlint.zarb.org/svn/trunk*** glibc detected *** svn: free(): invalid pointer: 0x00c17820 *** ***

Re: [sqlite] SQLite Shell Bug, Ignores Separators in Quotes Sometimes When Importing Data

2012-07-23 Thread Richard Hipp
On Mon, Jul 23, 2012 at 8:37 AM, Hayes, Michael - IS michael.ha...@exelisinc.com wrote: The documentation says that the separator will be honored even inside of quotes. (The SQLite shell will always split fields on the separator character, no matter what comes before or after it. Quotes or

[sqlite] Restore SQLite DB from WAL

2012-07-23 Thread gsm-ginger
Hi, everyone Is it possible to restore deleted rows or dropped tables provided the WAL and shm files are still intact and contain the data you want to restore? Example scenario where vast swathes of content have vanished from mmssms.db thanks to an unintentional mass-DELETE FROM through the

Re: [sqlite] Restore SQLite DB from WAL

2012-07-23 Thread Richard Hipp
On Mon, Jul 23, 2012 at 12:10 PM, gsm-gin...@gmx.ie wrote: Hi, everyone Is it possible to restore deleted rows or dropped tables provided the WAL and shm files are still intact and contain the data you want to restore? The WAL file does not contain the old data, it contains the new data.

Re: [sqlite] SQLite Shell Bug, Ignores Separators in Quotes Sometimes When Importing Data

2012-07-23 Thread Black, Michael (IS)
Hmmmyour data import works just fine in 3.7.9...but you're correct that 3.7.13 burps with that error message doing the same import. So something changed C:\sqlitesqlite3 data.db SQLite version 3.7.9 2011-11-01 00:52:41 Enter .help for instructions Enter SQL statements terminated with a ;

Re: [sqlite] single gdbconn object with multiple threads.

2012-07-23 Thread Igor Tandetnik
On 7/23/2012 10:30 AM, Durga D wrote: Unless your threads do something else in parallel, you could just as well do all SQLite work on a single thread doubt: all are parallel threads. started at same time. one thread is writing and others are reading at the same time by using same sqlite3*.

Re: [sqlite] Tests fail with some glibc malloc/realloc/free-related warnings on Mageia Linux 3/Cauldron with glibc-2.16-2.mga3

2012-07-23 Thread Shlomi Fish
Hi, On Mon, 23 Jul 2012 12:09:09 -0400 Richard Hipp d...@sqlite.org wrote: On Mon, Jul 23, 2012 at 9:31 AM, Shlomi Fish shlo...@shlomifish.org wrote: I first suspected svn was the culprit, so I rebuilt it, but it still happened. Then I tried build SQLite and running its tests and I

Re: [sqlite] Tests fail with some glibc malloc/realloc/free-related warnings on Mageia Linux 3/Cauldron with glibc-2.16-2.mga3

2012-07-23 Thread Richard Hipp
On Mon, Jul 23, 2012 at 9:31 AM, Shlomi Fish shlo...@shlomifish.org wrote: I first suspected svn was the culprit, so I rebuilt it, but it still happened. Then I tried build SQLite and running its tests and I got this (below). I should note that svn works fine after I type unset MALLOC_CHECK_

Re: [sqlite] Compiling System.Data.SQLite with latest sqlite3.dll

2012-07-23 Thread Bernhard Mogens Ege
Well, I ended up trying with 1.0.82.0 as it is now in the repository, and followed the build instructions (which need to be updated ) to generate new dll's with 3.7.14 (as it turns out) included. But I still cannot use the filename syntax (I can use, but it seems to be ignored as I get an empty

Re: [sqlite] SQLite Shell Bug, Ignores Separators in Quotes Sometimes When Importing Data

2012-07-23 Thread Kevin Benson
On Mon, Jul 23, 2012 at 12:05 PM, Richard Hipp d...@sqlite.org wrote: On Mon, Jul 23, 2012 at 8:37 AM, Hayes, Michael - IS michael.ha...@exelisinc.com wrote: The documentation says that the separator will be honored even inside of quotes. (The SQLite shell will always split fields on

Re: [sqlite] SQLite Shell Bug, Ignores Separators in Quotes Sometimes When Importing Data

2012-07-23 Thread Richard Hipp
On Mon, Jul 23, 2012 at 2:28 PM, Kevin Benson kevin.m.ben...@gmail.comwrote: On Mon, Jul 23, 2012 at 12:05 PM, Richard Hipp d...@sqlite.org wrote: On Mon, Jul 23, 2012 at 8:37 AM, Hayes, Michael - IS michael.ha...@exelisinc.com wrote: The documentation says that the separator will

[sqlite] C++ - Creating Table

2012-07-23 Thread Arbol One
Using SQLite version 3.7.8 amalgamation, under Win7 with MinGW, I compile the bellow program, but for some strange reason I am getting a runtime error when creating the table. I hope that one of you would be able to tell me what I am doing wrong. TIA === class mySQLite3Class { private:

Re: [sqlite] SQLite Shell Bug, Ignores Separators in Quotes Sometimes When Importing Data

2012-07-23 Thread Black, Michael (IS)
Nope -- that doesn't work. Seems to me if the import is going to assume the field is text it should also recognize that if it doesn't start with a quote it shouldn't assume that all quotes are delimiters. Plus, it should recognize that any quotes that aren't at the beginning or end-of-field

Re: [sqlite] C++ - Creating Table

2012-07-23 Thread Pavel Ivanov
As you don't have stmt defined anywhere this is apparently not the actual program you run. Seeing the full source code would be more helpful. If the whole source is too big try to reduce it to small program reproducing the problem. It's possible that while attempting to reduce program source

Re: [sqlite] Restore SQLite DB from WAL

2012-07-23 Thread gsm-ginger
So close, yet so far! This is really getting on my wick... Example scenario where vast swathes of content have vanished from mmssms.db thanks to an unintentional mass-DELETE FROM through the naughty Android SMS app: ls -al /data/data/com.android.providers.telephony/databases/mm* -rw-rw

Re: [sqlite] C++ - Creating Table

2012-07-23 Thread Black, Michael (IS)
Just as a sanity check your code does work OK. I made it a standalone program. #include iostream #include sqlite3.h using namespace std; class mySQLite3Class { private: //SQLite3 sqlite3* db; //SQLite3 string dbName; // Database name string apstr; // All Purpose String string

Re: [sqlite] Restore SQLite DB from WAL

2012-07-23 Thread Richard Hipp
On Mon, Jul 23, 2012 at 3:51 PM, gsm-gin...@gmx.ie wrote: Is there any way to merge the lost data stored in mmssms.db-wal / mmssms.db-shm back into mmssms.db? For example, if the DB/WAL stores a bunch of DELETE FROM statements could they be changed to INSERT INTO? The WAL file does not

Re: [sqlite] Restore SQLite DB from WAL

2012-07-23 Thread gsm-ginger
The WAL file does not store a bunch of DELETE FROM statements. The WAL file stores 4k pages of the database file as they will appear after the delete occurs. Details at http://www.sqlite.org/fileformat2.html So, no, there is no way to do what you are asking. Damn! Failing that, is there a

Re: [sqlite] Restore SQLite DB from WAL

2012-07-23 Thread Pavel Ivanov
In each case the same thing happens, the messages briefly display, then disappear I think your sms-controlling app has synced the whole sms database with some server. When you start your phone it shows you local data but then it sees that server has latest data (maybe using modification date on

Re: [sqlite] Help: database/disk full in creating index

2012-07-23 Thread Wang, Gao
Dear sqlite experts, I am having problems creating index for my database. The error says: database or disk is full, although I am sure there is sufficient space left on the disk where the database is located. However the Linux /tmp and /var/tmp folders are mounted to a 40GB small disk (my

Re: [sqlite] Help: database/disk full in creating index

2012-07-23 Thread Simon Slavin
On 23 Jul 2012, at 10:24pm, Wang, Gao wan...@gmail.com wrote: I am having problems creating index for my database. Can you explain what SQLite calls you are using to do this ? Do you mean you are using a CREATE INDEX command ? Also, can you execute PRAGMA journal_mode on your database and

Re: [sqlite] Help: database/disk full in creating index

2012-07-23 Thread Richard Hipp
On Mon, Jul 23, 2012 at 5:24 PM, Wang, Gao wan...@gmail.com wrote: 2) is there a way to re-set such a tmp directory path? export TMPDIR=/new/temporary/dir/with-lots-of-space -- D. Richard Hipp d...@sqlite.org ___ sqlite-users mailing list

Re: [sqlite] Restore SQLite DB from WAL

2012-07-23 Thread Gilleán Ó Raghallaigh
I think your sms-controlling app has synced the whole sms database with some server. When you start your phone it shows you local data but then it sees that server has latest data (maybe using modification date on the database, maybe some synchronization token stored in the database) and

Re: [sqlite] Restore SQLite DB from WAL

2012-07-23 Thread gsm-ginger
The WAL file does not store a bunch of DELETE FROM statements. The WAL file stores 4k pages of the database file as they will appear after the delete occurs. Details at http://www.sqlite.org/fileformat2.html So, no, there is no way to do what you are asking Is there, instead, a method for

Re: [sqlite] C++ - Creating Table

2012-07-23 Thread Arbol One
Thank you Michael for your prompt response. I have been able to duplicate the error message. I think this could be a bug in SQLite3. If it is a bug, how do I go about reporting it? //== my_sqlite3.hpp === #ifndef JME_MY_SQLITE3_HPP #define JME_MY_SQLITE3_HPP #include iostream #includesqlite3.h

Re: [sqlite] Compiling System.Data.SQLite with latest sqlite3.dll

2012-07-23 Thread J Decker
On Mon, Jul 23, 2012 at 3:04 AM, Bernhard Mogens Ege b...@saseco.dk wrote: I am trying to figure out how to compile System.Data.SQLite and in the process update sqlite from 3.7.12.1 to 3.7.13 as I need the shared cache option for memory connections. And when I write 'trying' I am having

Re: [sqlite] Help: database/disk full in creating index

2012-07-23 Thread Wang, Gao
Thank you Simon! Can you explain what SQLite calls you are using to do this ? Do you mean you are using a CREATE INDEX command ? Yes indeed. The command reads: CREATE INDEX data_idx ON data (key ASC); Also, can you execute PRAGMA journal_mode on your database and tell us the result ? The

Re: [sqlite] C++ - Creating Table

2012-07-23 Thread Robert Myers
On 7/23/2012 7:43 PM, Arbol One wrote: Thank you Michael for your prompt response. I have been able to duplicate the error message. I think this could be a bug in SQLite3. void jme::mySQLite3::createTable(const std::string s) throw (std::exception) { rc = sqlite3_prepare_v2( db, s.c_str(),

Re: [sqlite] C++ - Creating Table

2012-07-23 Thread Keith Medcalf
And of course, finalize after close is wrong. You finalize the statement, then close the db, then bail. --- () ascii ribbon campaign against html e-mail /\ www.asciiribbon.org -Original Message- From: sqlite-users-boun...@sqlite.org [mailto:sqlite-users- boun...@sqlite.org] On

Re: [sqlite] single gdbconn object with multiple threads.

2012-07-23 Thread Durga D
Thank you Simon/Igor. I got the answer. But since all the work is serialized, a single thread that does all the reading and writing would be just as fast, if not slightly faster. How can I achieve this with single thread? My Req. is: I have to write a wrapper for sqlite3. This wrapper will be