Re: [sqlite] insert gdkpixbuf to sqlite database

2009-07-28 Thread Roger Binns
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Divya K M wrote: > I am using a GdkPixbuf and want to store the pixbuf created to the > sqlite3 database.Please can you tell what's wrong in code found below. It isn't using the SQLite API :-) SQLite does fundamentally work with blobs so the issue

[sqlite] insert gdkpixbuf to sqlite database

2009-07-28 Thread Divya K M
Hi, I am using a GdkPixbuf and want to store the pixbuf created to the sqlite3 database.Please can you tell what's wrong in code found below. execute_sql_non_select (cnc, "CREATE TABLE IF NOT EXISTS Thumbails (AlbumId text, ThumbData blob, ThumPath text)"); GdkPixbuf *thumbPixbuf; thumbPixbuf

Re: [sqlite] a system for arbitrarily tagging rows -- revisited

2009-07-28 Thread Pavel Ivanov
> I can't understand what that != 1 constraint is doing in the FROM > clause. Shouldn't a constraint be in the WHERE clause while the FROM > clause should only describe the source tables? AFAIK, when you're writing your FROM clause in the form "table1 JOIN table2 ON condition" you can write

Re: [sqlite] search time is non-determinate in multi-thread enviroment

2009-07-28 Thread pierr
Jay A. Kreibich-2 wrote: > > > THREADSAFE=1 is "Serialize mode" and THREADSAFE=2 is "Multithread" > mode. THREADSAFE=2 (basic Multithread) actually offers less protection, > requiring the application to provide its own locks to prevent multiple > threads from accessing the DB at the

Re: [sqlite] a system for arbitrarily tagging rows -- revisited

2009-07-28 Thread P Kishor
On Tue, Jul 28, 2009 at 7:45 PM, Pavel Ivanov wrote: > First of all you've mentioned schema which is not in agreement > slightly with sql you've given. But of course we can guess... > Second your sql seems to do slightly different thing from what you're > saying. In particular

Re: [sqlite] DATETIME and storage type

2009-07-28 Thread John Stanton
Sqlite does not have a DATETIME type. It stores the decalred type but ignored it. You can use it in your application. Rael Bauer wrote: > Hi, > > If I declare a field as DATETIME default "2001-01-01", ( e.g. alter table > "notes" add column "last_modified" DATETIME default "2001-01-01";)

Re: [sqlite] search time is non-determinate in multi-thread enviroment

2009-07-28 Thread pierr
Igor Tandetnik wrote: > > pierr wrote: >> Hi, >> My sqlite is configure as serialized (THREADSAFE=1). My application >> has only one connection but it is shared by two thread. One thread >> will do insert/update/delete in the background , another thread will >> do the select upon request of

Re: [sqlite] a system for arbitrarily tagging rows -- revisited

2009-07-28 Thread P Kishor
Pavel, On Tue, Jul 28, 2009 at 7:45 PM, Pavel Ivanov wrote: > First of all you've mentioned schema which is not in agreement > slightly with sql you've given. But of course we can guess... > Second your sql seems to do slightly different thing from what you're > saying. In

Re: [sqlite] a system for arbitrarily tagging rows -- revisited

2009-07-28 Thread Pavel Ivanov
First of all you've mentioned schema which is not in agreement slightly with sql you've given. But of course we can guess... Second your sql seems to do slightly different thing from what you're saying. In particular I'm concerned about this sentence: > If the tag is the same as the

[sqlite] a system for arbitrarily tagging rows -- revisited

2009-07-28 Thread P Kishor
Following up on my recent question about arbitrarily tagging rows in a table, my website has certain pages that are tagged as 'Photos' and other tags (http://www.punkish.org/Photos). The table schema is as follows TABLE pages (p_id INTEGER PRIMARY KEY, p_name TEXT); TABLE tag (t_id INTEGER

Re: [sqlite] inner joins on prepared statements

2009-07-28 Thread Igor Tandetnik
Shaun Seckman (Firaxis) wrote: >Say I have the following prepared statement "select > B.foo from A inner join B on A.bar = B.bar where A.foo = ?" used to > populate values from a reference table. If I intend on executing this > statement several times

Re: [sqlite] How secure is encrypted sqlite database

2009-07-28 Thread Kees Nuyt
On Tue, 28 Jul 2009 16:32:51 -0400, Ram G wrote: >Hi >I have modified (credit goes to System.Data.SQLite) SQlite library to >encrypt the database. File is encrypted and data insert/update/retrieval >works fine. > >The question I have is, how secure is the encrypted

Re: [sqlite] How secure is encrypted sqlite database

2009-07-28 Thread Roger Binns
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Robert Simpson wrote: > The .NET provider uses RC4 encryption. The entire file is encrypted, > including the metadata. You also neglected to mention that the encryption key has to be provided locally to decrypt/encrypt the database :-) Since the

Re: [sqlite] How secure is encrypted sqlite database

2009-07-28 Thread Simon Slavin
On 28 Jul 2009, at 9:32pm, Ram G wrote: > I have modified (credit goes to System.Data.SQLite) SQlite library to > encrypt the database. File is encrypted and data insert/update/ > retrieval > works fine. > > The question I have is, how secure is the encrypted database. You seem to have

Re: [sqlite] How secure is encrypted sqlite database

2009-07-28 Thread Robert Simpson
The .NET provider uses RC4 encryption. The entire file is encrypted, including the metadata. SQLite (the engine) may store unencrypted pages in its internal cache, but I don't really know for sure. The bottom line is that nothing is safe from a hacker who has your binaries and database on

[sqlite] inner joins on prepared statements

2009-07-28 Thread Shaun Seckman (Firaxis)
Hello All, Say I have the following prepared statement "select B.foo from A inner join B on A.bar = B.bar where A.foo = ?" used to populate values from a reference table. If I intend on executing this statement several times with different bound values, is it better for me to

[sqlite] How secure is encrypted sqlite database

2009-07-28 Thread Ram G
Hi I have modified (credit goes to System.Data.SQLite) SQlite library to encrypt the database. File is encrypted and data insert/update/retrieval works fine. The question I have is, how secure is the encrypted database. Please correct me if I am wrong, SQLite reads the file and stores some of the

Re: [sqlite] good books for beginners (was Re: What is a Relation?)

2009-07-28 Thread Darren Duncan
Darren Duncan wrote: > So I farmed out this question yesterday to another list I'm on, and got > another > And another response said: > >After having read a few of the responses, the original question strikes me > as > "very hard to answer". > >I mean, how can one be a "seasoned

Re: [sqlite] Insert multiple entries in a single INSERT statement

2009-07-28 Thread Simon Slavin
On 28 Jul 2009, at 7:22pm, Shaun Seckman (Firaxis) wrote: >Looking at the SQL syntax chart it doesn't seem like > this is possible. In other SQL servers I'm able to use the statement > "insert into foo('col1', col2') values ('1', '1'), ('2', '2'), ('3', > '3');". Is this

[sqlite] good books for beginners (was Re: What is a Relation?)

2009-07-28 Thread Darren Duncan
Paul Claessen wrote: > So .. would anyone know a good book for seasoned programmers, who are new to > databases, that addresses all these issues? So I farmed out this question yesterday to another list I'm on, and got another recommendation for you. Quoth: For beginners, whether

Re: [sqlite] Insert multiple entries in a single INSERT statement

2009-07-28 Thread Hoover, Jeffrey
(apologies, I had a typo in my code sample, here is a correction) if your are using Perl you can "bulk insert" the data... . . . use DBI; our $errorMessage; . . . my @mydata = (); { my @myrow = (1,1); push @mydata, \...@myrow; } {

Re: [sqlite] Insert multiple entries in a single INSERT statement

2009-07-28 Thread Rich Shepard
On Tue, 28 Jul 2009, Shaun Seckman (Firaxis) wrote: > Looking at the SQL syntax chart it doesn't seem like this is possible. > In other SQL servers I'm able to use the statement "insert into > foo('col1', col2') values ('1', '1'), ('2', '2'), ('3', '3');". Is this > possible in SQLite or must

Re: [sqlite] Insert multiple entries in a single INSERT statement

2009-07-28 Thread Hoover, Jeffrey
if your are using Perl you can "bulk insert" the data... . . . use DBI; our $errorMessage; . . . my @mydata = (); { my @myrow = (1,1); push @mydata, \...@myrow; } { my @myrow = (2,2); push @mydata, \...@myrow; } {

Re: [sqlite] Insert multiple entries in a single INSERT statement

2009-07-28 Thread Kees Nuyt
On Tue, 28 Jul 2009 14:22:28 -0400, "Shaun Seckman (Firaxis)" wrote: >Hello, > >Looking at the SQL syntax chart it doesn't seem like >this is possible. In other SQL servers I'm able to use the statement >"insert into foo('col1', col2') values ('1',

[sqlite] Insert multiple entries in a single INSERT statement

2009-07-28 Thread Shaun Seckman (Firaxis)
Hello, Looking at the SQL syntax chart it doesn't seem like this is possible. In other SQL servers I'm able to use the statement "insert into foo('col1', col2') values ('1', '1'), ('2', '2'), ('3', '3');". Is this possible in SQLite or must I instead insert one at a time.

Re: [sqlite] search time is non-determinate in multi-thread enviroment

2009-07-28 Thread Jay A. Kreibich
On Tue, Jul 28, 2009 at 07:59:23AM -0400, Igor Tandetnik scratched on the wall: > pierr wrote: > > Any insight? Should I go with THREADSAFE=2 and two connections: one > > for read ,another for write? Thanks. > > THREADSAFE is not a number of allowed concurrent threads. It's a boolean > switch

Re: [sqlite] search time is non-determinate in multi-thread enviroment

2009-07-28 Thread Igor Tandetnik
pierr wrote: > Hi, > My sqlite is configure as serialized (THREADSAFE=1). My application > has only one connection but it is shared by two thread. One thread > will do insert/update/delete in the background , another thread will > do the select upon request of the user from gui. > Typically, we

[sqlite] DATETIME and storage type

2009-07-28 Thread Rael Bauer
Hi, If I declare a field as DATETIME default "2001-01-01", ( e.g. alter table "notes" add column "last_modified" DATETIME default "2001-01-01";) will the declared default value be stored as a string or real value? Also, more generally, how can I find out what storage type field values have been

Re: [sqlite] How to dump cookies.sqlite

2009-07-28 Thread Kees Nuyt
On Mon, 27 Jul 2009 20:39:34 -0700 (PDT), Mutiullah Qureshi wrote: >Hello friends. >I have downloaded sqlite3-3.6.16.bin.gz and extracted sqlite3-3.6.16.bin in >fedora 9. Now I want to dump cookies.sqlite from mozila firefox cache to >cookies.tmp. I have tried: >

Re: [sqlite] hi - sqlite3 advantages

2009-07-28 Thread Kees Nuyt
On Mon, 27 Jul 2009 22:54:18 -0430, An wrote: >Hi ! > >SQLite is a really cool database... > >I currently still use version 2... I would like the insight of whoever feels >like it of some advantages of version 3 over version 2 maybe i get >convinced on the importance to

Re: [sqlite] search time is non-determinate in multi-thread enviroment

2009-07-28 Thread pierr
pierr wrote: > > Hi, >My sqlite is configure as serialized (THREADSAFE=1). My application has > only one connection but it is shared by two thread. One thread will do > insert/update/delete in the background , another thread will do the select > upon request of the user from gui. >

[sqlite] search time is non-determinate in multi-thread enviroment

2009-07-28 Thread pierr
Hi, My sqlite is configure as serialized (THREADSAFE=1). My application has only one connection but it is shared by two thread. One thread will do insert/update/delete in the background , another thread will do the select upon request of the user from gui. Typically, we will call following