[sqlite] inserting blob data

2009-03-31 Thread Mayura S.
Hi,   I'm using 3.2.2. I have a binary data in a variable which I want to store as a blob in my database table. I have defined a blob field in my table. Since this binary data varies in size every time, hence I want to store it as blob. Please let me know how can I insert a blob data using the

Re: [sqlite] Insert performance in 3.6.11 vs. 3.5.5

2009-03-31 Thread Günter Obiltschnig
Well, seems that was a false alarm. We were not able to reproduce this on other systems - there the 3.6.11 release even performed slightly better than 3.5.5. Still no idea what caused this, as now even the original system no longer shows this effect, but it's very probably not SQLite.

Re: [sqlite] how to call c/c++ function in trigger

2009-03-31 Thread Igor Tandetnik
Simon Chen wrote: > What I want is: > > - whenever I insert/update/delete a table entry, the specified c/c++ > function is called > - if the function returns true, the db action can proceed; otherwise, > the db action should be rolled-back. create trigger triggerName

Re: [sqlite] SQLite version 3.6.12

2009-03-31 Thread D. Richard Hipp
On Mar 31, 2009, at 7:42 PM, Zbigniew Baniewski wrote: > On Tue, Mar 31, 2009 at 07:42:49PM -0400, D. Richard Hipp wrote: > >> I just checked the sqlite-3_6_12-tea.tar.gz tarball on the website, >> and it contains no "3.6.11" text. Only "3.6.12". I think you have >> somehow obtained the wrong

Re: [sqlite] SQLite version 3.6.12

2009-03-31 Thread Zbigniew Baniewski
Sorry, checked it again, and noticed now, that this kind of tarball seems to be kinda abandoned: :( "The Makefile and configure script in this tarball are not supported" -- pozdrawiam / regards Zbigniew Baniewski

Re: [sqlite] SQLite version 3.6.12

2009-03-31 Thread Zbigniew Baniewski
On Tue, Mar 31, 2009 at 07:42:49PM -0400, D. Richard Hipp wrote: > I just checked the sqlite-3_6_12-tea.tar.gz tarball on the website, > and it contains no "3.6.11" text. Only "3.6.12". I think you have > somehow obtained the wrong configure script. I meant sqlite-3.6.12.tar.gz package.

Re: [sqlite] SQLite version 3.6.12

2009-03-31 Thread D. Richard Hipp
I just checked the sqlite-3_6_12-tea.tar.gz tarball on the website, and it contains no "3.6.11" text. Only "3.6.12". I think you have somehow obtained the wrong configure script. On Mar 31, 2009, at 7:34 PM, Zbigniew Baniewski wrote: > The "configure" script included in tarball has

Re: [sqlite] SQLite version 3.6.12

2009-03-31 Thread Zbigniew Baniewski
The "configure" script included in tarball has entries, like f.e.: #! /bin/sh # Guess values for system-dependent variables and create Makefiles. # Generated by GNU Autoconf 2.63 for sqlite 3.6.11. # [..] # Identity of this package. PACKAGE_NAME='sqlite' PACKAGE_TARNAME='sqlite'

Re: [sqlite] SQLite version 3.6.12

2009-03-31 Thread D. Richard Hipp
On Mar 31, 2009, at 7:27 PM, Mike Frysinger wrote: > On Tuesday 31 March 2009 19:15:57 D. Richard Hipp wrote: >> On Mar 31, 2009, at 7:06 PM, Zbigniew Baniewski wrote: >>> On Tue, Mar 31, 2009 at 09:41:30AM -0400, D. Richard Hipp wrote: SQLite version 3.6.12 is now available on the SQLite

Re: [sqlite] How to process SQLITE_LOCKED_SHAREDCACHE error?

2009-03-31 Thread Dennis Volodomanov
> SQLITE_LOCKED_SHAREDCACHE is like SQLITE_LOCKED and can be processed > in the same way, if you want. But if you get a > SQLITE_LOCK_SHAREDCACHE you also have the option of calling > sqlite3_unlock_notify(). You should not use sqlite3_unlock_notify() > on an ordinary SQLITE_LOCKED. Additional

Re: [sqlite] SQLite version 3.6.12

2009-03-31 Thread Zbigniew Baniewski
On Tue, Mar 31, 2009 at 07:15:57PM -0400, D. Richard Hipp wrote: > I don't understand that. I can grep in the package for 3.6.11 and I > get no hits: > > grep 3.6.11 * */* > > On the other hand, if I grep from 3.6.12, I get lots of hits. So I do > not know where the package gets the

Re: [sqlite] How to process SQLITE_LOCKED_SHAREDCACHE error?

2009-03-31 Thread D. Richard Hipp
On Mar 31, 2009, at 7:14 PM, Dennis Volodomanov wrote: > Hello, > > I'd like to ask how should the SQLITE_LOCKED_SHAREDCACHE be processed? > Is it like a normal SQLITE_BUSY/SQLITE_LOCKED and I should sleep a bit > and try again? Or is this a fatal error and requires me to abort the >

Re: [sqlite] SQLite version 3.6.12

2009-03-31 Thread D. Richard Hipp
On Mar 31, 2009, at 7:06 PM, Zbigniew Baniewski wrote: > On Tue, Mar 31, 2009 at 09:41:30AM -0400, D. Richard Hipp wrote: > >> SQLite version 3.6.12 is now available on the SQLite website > > ...and once again TCL module is flawed: > > #v+ > % package require sqlite3 > attempt to provide

[sqlite] How to process SQLITE_LOCKED_SHAREDCACHE error?

2009-03-31 Thread Dennis Volodomanov
Hello, I'd like to ask how should the SQLITE_LOCKED_SHAREDCACHE be processed? Is it like a normal SQLITE_BUSY/SQLITE_LOCKED and I should sleep a bit and try again? Or is this a fatal error and requires me to abort the transaction? Thanks in advance, Dennis

Re: [sqlite] SQLite version 3.6.12

2009-03-31 Thread Zbigniew Baniewski
On Tue, Mar 31, 2009 at 09:41:30AM -0400, D. Richard Hipp wrote: > SQLite version 3.6.12 is now available on the SQLite website ...and once again TCL module is flawed: #v+ % package require sqlite3 attempt to provide package sqlite3 3.6.12 failed: package sqlite3 3.6.11 % provided instead

[sqlite] how to call c/c++ function in trigger

2009-03-31 Thread Simon Chen
Hi all, I have a question regarding calling c/c++ functions in sqlite triggers. What I want is: - whenever I insert/update/delete a table entry, the specified c/c++ function is called - if the function returns true, the db action can proceed; otherwise, the db action should be rolled-back. Is

Re: [sqlite] export table to csv

2009-03-31 Thread Ribeiro, Glauber
You can only use one command in the command-line. Use options for the others, like this: Sqlite3.exe -csv -separator ',' ioimport.db3 "select * from iotemplate;" >thisisit.csv -Original Message- From: Richard Nero [mailto:rich...@rlnero.com] Sent: Monday, March 30, 2009 10:12 AM To:

Re: [sqlite] SQLite version 3.6.12

2009-03-31 Thread Jay A. Kreibich
On Tue, Mar 31, 2009 at 09:41:30AM -0400, D. Richard Hipp scratched on the wall: > SQLite version 3.6.12 is now available on the SQLite website > New features added to version 3.6.12 include the > sqlite3_unlock_notify() interface and the reverse_unordered_selects > PRAGMA. Additional

Re: [sqlite] export table to csv

2009-03-31 Thread Griggs, Donald
Hi Richard, The sqlite3 utility allows a *single* dot-command on the command line itself. You can have an unlimited number of commands in a separate text file, though. http://www.sqlite.org/sqlite.html So, using Windows syntax, you can have something like: === Set

[sqlite] SQLite version 3.6.12

2009-03-31 Thread D. Richard Hipp
SQLite version 3.6.12 is now available on the SQLite website http://www.sqlite.org/ During release testing for 3.6.12, we stumbled over a critical bug that has existed in SQLite since version 3.4.0. This bug will cause corruption of in-memory databases if an incremental vacuum is

Re: [sqlite] Selecting records by INDEXED key

2009-03-31 Thread Martin Engelschalk
Hi, your select statement does not include a "where" or "order by" - clause for which the index can be used, which is the cause of the error. If you want to select "the records by their index sequence", you should use Select * From "APPLE" ORDER BY "MySurname"; The index will then be used

[sqlite] Selecting records by INDEXED key

2009-03-31 Thread ggcooper
Hi I am trying to select (list) records by their index sequence BUT keep getting the SQL error. "SQL error can't use index: Surname" . Indices showes the index ; ;Sample INDEX program ; CREATE TABLE "APPLE" ("MyName", "MySurname",

[sqlite] Sqlite .import not ignoring extra fields

2009-03-31 Thread BOB_GOREN
With sqlite 2.8, the copy command would ignore extra fields at the end. How can I do this with .import in sqlite 3.11? Many of the files I am importing have trailing field separators. Others may have extra data. The files are too big for me to want a separate pass to trim off the trailing

[sqlite] export table to csv

2009-03-31 Thread Richard Nero
All, I can successfully import a databese via command line with: sqlite3.exe -separator , ioimport.db3 ".import Temp.csv iofromexcel" Now i am trying to export a table in the db with: sqlite3.exe ioimport.db3 .mode csv .separator , .output thisisit.csv "select * from iotemplate;" .output

Re: [sqlite] Unnecessary line breaks in .dump output

2009-03-31 Thread P Kishor
On Tue, Mar 31, 2009 at 5:46 AM, Francois Botha wrote: >> >> Perhaps the OP should file a ticket to have this corrected >> in the SQLite command line tool. >> > > What's the OP?  Just want to know if I must log the bug or whether you're > referring to somebody else. > >

Re: [sqlite] Unnecessary line breaks in .dump output

2009-03-31 Thread Francois Botha
> > Perhaps the OP should file a ticket to have this corrected > in the SQLite command line tool. > What's the OP? Just want to know if I must log the bug or whether you're referring to somebody else. If the OP is somebody else, please log it and let me know what the ticket number is so that I

[sqlite] Corruption of incremental_vacuum databases

2009-03-31 Thread Filip Navara
Hello, after seeing the recent change #6413 and ticket #3761 I finally decided to write about a corruption issue we have. This is the environment of our application: - We are using SQLite 3.6.3 (with SQLite.NET 1.0.60.0). - Several database files. Each file is opened in it's own connection and