Re: [sqlite] sqlite Commit C API

2012-05-17 Thread Marc L. Allen
Funny! But, very inefficient. Suggest: #define fsync(x) Marc -Original Message- From: sqlite-users-boun...@sqlite.org [mailto:sqlite-users-boun...@sqlite.org] On Behalf Of Simon Slavin Sent: Thursday, May 17, 2012 11:52 AM To: j...@kreibi.ch; General Discussion of SQLite Database Subj

Re: [sqlite] sqlite Commit C API

2012-05-17 Thread Simon Slavin
On 17 May 2012, at 5:04pm, Rajesh Kumar wrote: > int fsync( int fd ) { return 0; } > > fsync will expect an Integer pointer right. But sqlite pointer is of type > sqlite3*. So how can fsync works on sqlite. What should I pass to fsync??? Sorry Rajesh. It was a programmer's joke. Ignore that.

Re: [sqlite] sqlite Commit C API

2012-05-17 Thread Rajesh Kumar
int fsync( int fd ) { return 0; } fsync will expect an Integer pointer right. But sqlite pointer is of type sqlite3*. So how can fsync works on sqlite. What should I pass to fsync??? On Thu, May 17, 2012 at 9:19 PM, Jay A. Kreibich wrote: > int fsync( int fd ) { return 0; } -- * Thanks &

Re: [sqlite] sqlite Commit C API

2012-05-17 Thread Simon Slavin
On 17 May 2012, at 4:49pm, Jay A. Kreibich wrote: > I wouldn't be all that shocked to find out an embedded system has an > fsync() call that looks like this: > > int fsync( int fd ) { return 0; } We are best software circle ! Our programmers write many functions a day ! Our functions run

Re: [sqlite] sqlite Commit C API

2012-05-17 Thread Jay A. Kreibich
On Thu, May 17, 2012 at 08:58:39PM +0530, Rajesh Kumar scratched on the wall: > Hi Richard, > > Thanks for the reply. fsync() is related to system call, which is > working fine. I believe you're missing Richard's point. I'm sure fsync() is returning a success error code. That doesn't m

Re: [sqlite] sqlite Commit C API

2012-05-17 Thread Simon Slavin
On 17 May 2012, at 4:34pm, Rajesh Kumar wrote: > No am not using any PRAGMAs. I just cross compiled sqlite source to > ARM architecture. Can't I forcefully do commit on my transaction If you are correctly using _open() and _close(), and haven't disabled synchrony with PRAGMAs or compilatio

Re: [sqlite] sqlite Commit C API

2012-05-17 Thread Rajesh Kumar
So if I use _exec() after sqlit3_exec() API, what ever the I did on database will be saved, right?? On Thu, May 17, 2012 at 9:03 PM, Simon Slavin wrote: > > On 17 May 2012, at 4:28pm, Rajesh Kumar wrote: > > >Thanks for the reply. fsync() is related to system call, which is > > working

Re: [sqlite] copy table to another db file

2012-05-17 Thread Jay A. Kreibich
On Thu, May 17, 2012 at 11:36:53AM +0200, Luuk scratched on the wall: > On 17-05-2012 11:04, YAN HONG YE wrote: > > I have two db files: > > > > sqlite3 *db1; > > sqlite3 *db2; > > rc1 = sqlite3_open("myfile1", &db1); > > rc2 = sqlite3_open("myfile2", &db2); > > > > I want to copy db1.table1 to

Re: [sqlite] sqlite Commit C API

2012-05-17 Thread Rajesh Kumar
No am not using any PRAGMAs. I just cross compiled sqlite source to ARM architecture. Can't I forcefully do commit on my transaction On Thu, May 17, 2012 at 8:55 PM, Simon Slavin wrote: > > On 17 May 2012, at 4:18pm, Rajesh Kumar wrote: > > > Am using sqlite database on my ARM processor bas

Re: [sqlite] sqlite Commit C API

2012-05-17 Thread Simon Slavin
On 17 May 2012, at 4:28pm, Rajesh Kumar wrote: >Thanks for the reply. fsync() is related to system call, which is > working fine. But I am looking for a C API that can do the commit thing, > which is same as commit on command promt. The COMMIT; on a command prompt does the same thing as ex

Re: [sqlite] sqlite Commit C API

2012-05-17 Thread Rajesh Kumar
Hi Richard, Thanks for the reply. fsync() is related to system call, which is working fine. But I am looking for a C API that can do the commit thing, which is same as commit on command promt. On Thu, May 17, 2012 at 8:52 PM, Richard Hipp wrote: > On Thu, May 17, 2012 at 11:18 AM, Rajesh K

Re: [sqlite] sqlite Commit C API

2012-05-17 Thread Jay A. Kreibich
On Thu, May 17, 2012 at 11:22:44AM -0400, Richard Hipp scratched on the wall: > On Thu, May 17, 2012 at 11:18 AM, Rajesh Kumar wrote: > > > Hi all, > > > >Am using sqlite database on my ARM processor based Embedded system . > > Whenever power failures or due to uneven shutdown of device, my d

Re: [sqlite] sqlite Commit C API

2012-05-17 Thread Simon Slavin
On 17 May 2012, at 4:18pm, Rajesh Kumar wrote: > Am using sqlite database on my ARM processor based Embedded system . > Whenever power failures or due to uneven shutdown of device, my database > is being corrupted which leading to data lost. Am using C API interface for > accessing database. Ar

Re: [sqlite] sqlite Commit C API

2012-05-17 Thread Richard Hipp
On Thu, May 17, 2012 at 11:18 AM, Rajesh Kumar wrote: > Hi all, > >Am using sqlite database on my ARM processor based Embedded system . > Whenever power failures or due to uneven shutdown of device, my database > is being corrupted which leading to data lost. That should never happen. It s

[sqlite] sqlite Commit C API

2012-05-17 Thread Rajesh Kumar
Hi all, Am using sqlite database on my ARM processor based Embedded system . Whenever power failures or due to uneven shutdown of device, my database is being corrupted which leading to data lost. Am using C API interface for accessing database. Is there any C API that I can use to commit my D

Re: [sqlite] copy table to another db file

2012-05-17 Thread Yuriy Kaminskiy
Luuk wrote: > On 17-05-2012 11:04, YAN HONG YE wrote: >> I have two db files: >> >> sqlite3 *db1; >> sqlite3 *db2; >> rc1 = sqlite3_open("myfile1", &db1); >> rc2 = sqlite3_open("myfile2", &db2); >> >> I want to copy db1.table1 to db2 file, but I don't know how to do? > > sqlite myfile1 > sqlite>

Re: [sqlite] don't understand what "query" returns...

2012-05-17 Thread Keith Medcalf
> If you don't mind, I'd have one further question. I read the query results > named "output" with Python. Why is it a list of tuples?? It's not very > handy... > >>print output > [(12.2817, 12.2817), (0, 0), (8.52, 8.52)] > It seems to be a list of tuples as far as I know Python. That is co

Re: [sqlite] Accented chars in Android embeded Sqlite.

2012-05-17 Thread Karl Edwall
Hello Yahoo, Another possible solution seeing you're on the Android platform and writing in Java is to use a less high tech solution and store an additional column with a copy of the text you're searching where you've stripped the accents out and use that for the search instead. It would use add

[sqlite] donwload is linkted to a old version

2012-05-17 Thread Jens Pustelnik
Hallo, the link of the current version on http://sqlite.org/download.html has the old version 3.7.10 as target and not 3.7.12 . best regards Jens -- -- Jens Pustelnik Petersstrasse 105 47249 Duisburg Email : j...@pustelnik.de -

Re: [sqlite] copy table to another db file

2012-05-17 Thread Luuk
On 17-05-2012 11:04, YAN HONG YE wrote: > I have two db files: > > sqlite3 *db1; > sqlite3 *db2; > rc1 = sqlite3_open("myfile1", &db1); > rc2 = sqlite3_open("myfile2", &db2); > > I want to copy db1.table1 to db2 file, but I don't know how to do? sqlite myfile1 sqlite> attach database 'myfile2'

Re: [sqlite] don't understand what "query" returns...

2012-05-17 Thread philherna
Thanks guys! it helps a lot. The "count" + "group" commands work fine only without the * though. If you don't mind, I'd have one further question. I read the query results named "output" with Python. Why is it a list of tuples?? It's not very handy... >>print output [(12.2817, 12.2817), (0, 0),

[sqlite] copy table to another db file

2012-05-17 Thread YAN HONG YE
I have two db files: sqlite3 *db1; sqlite3 *db2; rc1 = sqlite3_open("myfile1", &db1); rc2 = sqlite3_open("myfile2", &db2); I want to copy db1.table1 to db2 file, but I don't know how to do? ___ sqlite-users mailing list sqlite-users@sqlite.org http://s

Re: [sqlite] IS Visual Studio Design Time support provided by system.data.sqlite.org?

2012-05-17 Thread Dinesh Bajaj
Well, well. I removed the 64-bit installation, and installed the 32-bit version instead. And, voila, the design-time support option got added to VS !! -Dinesh From: Dinesh Bajaj To: "sqlite-users@sqlite.org" Sent: Thursday, 17 May 2012 12:56 PM Subject: [sql

[sqlite] IS Visual Studio Design Time support provided by system.data.sqlite.org?

2012-05-17 Thread Dinesh Bajaj
Hi All, I just installed the set up downloaded from http://system.data.sqlite.org, and selected the "Full" option while installation. The design support for Visual Studio was, however, not added to the VS 2010 edition installed in my computer by the set up program. Am I required to take any ad