[sqlite] Howto use max() function?

2004-09-10 Thread Clemens Eisserer
HI there! I have just migrated to my application from hsqldb to SQLite-2.8 using the jdbc-driver from christian werner. However I have a problem with the following statement which is used very oftern to increment indexes. I know this is not a cool way to archieve this, however I must be 100% fully

Re: [sqlite] Storing text in sqlite vs. external flat file

2004-09-10 Thread Ed Porter
Hi Ken I found that performance began to fail miserably as the blob size increased above 500 bytes (has anyone else experienced this problem?). When I posted the problem, I think that someone stated the docs show the reasonable limit on blobs is 230 bytes. Anyways, I had to store the blobs direct

Re: [sqlite] [ANN] 1st pre-alpha release of the SQLite OLE/DB provider

2004-09-10 Thread Nuno Lucas
Sorry about all anti-virus that started replying about a dangerous file attachment. I should have thought about it. You can get a look at the javascript code in this reply. Regards, ~Nuno Lucas Nuno Lucas, dando pulos de alegria, escreveu : Hi all. I just finished a first version of the SQLite OL

[sqlite] [ANN] 1st pre-alpha release of the SQLite OLE/DB provider

2004-09-10 Thread Nuno Lucas
Hi all. I just finished a first version of the SQLite OLE/DB provider. It only implements the basic ADO functionality (execute SQL command and Recordset view). I make it available for all (free of charge, with no limitations), so I can get feedback on the OLE/DB functionality people want most. You

Re: [sqlite] Newbie's first question about using SQLite in C++

2004-09-10 Thread EzTools Support
I would use the SqlitePlus COM DLL with .NET rather than try to wrap it with managed C++ code. See www.sqliteplus.com. try IeToolbox Passwords & Notes Keeper, Form Filler and much more www.ietoolbox.com JB wrote: I should like to use SQLite from within a VC 2003 NET program. Is this documented

Re: [sqlite] New DBD::SQLite*s

2004-09-10 Thread Darren Duncan
At 4:51 PM +0100 9/10/04, Matt Sergeant wrote: Uploaded to CPAN are DBD::SQLite 1.05 and DBD::SQLite2 0.33 Changes for DBD::SQLite2: 0.33 - Set HAVE_USLEEP appropriately. This massively improves concurrent access to your SQLite DB. Changes for DBD::SQLite: 1.05 - Enabled HAVE_USLE

Re: [sqlite] Encrypting data stored in database

2004-09-10 Thread Joey Blankenship
No argument here. We're targeting x86 and xScale architectures so we're able to reference DWORD objects on non-DWORD boundaries. I never really meant to distribute this code so we only tried to get it working for our purposes. I just hope someone can get some use from it. Joey. At 04:11 PM 9

RE: [sqlite] Encrypting data stored in database

2004-09-10 Thread Joey Blankenship
At the beginning of main.c after the includes: int ppdbuffersize = 10 * 1024; void *ppdbuffer; Also in main.c at the end of sqlite3_close before the return statement: free(ppdbuffer); Also in main.c at the beginning of openDatabase, after the declarations: ppdbuffer = malloc(ppdbuffersize); Now

Re: [sqlite] Storing text in sqlite vs. external flat file

2004-09-10 Thread Joseph Stewart
If you decide to store the text in an external file, you might check out this library to make this process a bit more fault tolerant (like sqlite): http://users.auriga.wearlab.de/~alb/libjio/ Cheers! -j On Fri, 10 Sep 2004 13:21:08 -0700, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > I am looki

[sqlite] Storing text in sqlite vs. external flat file

2004-09-10 Thread ken
I am looking into using sqlite for storing some data that will be ~100,000 records in size, where each record will contain text that has an average size of 40k, but could be > 200k. I will likely need to encrypt (and potentially compress) the database. My question is whether to store the text

Re: [sqlite] Encrypting data stored in database

2004-09-10 Thread Derrell . Lipman
Joey Blankenship <[EMAIL PROTECTED]> writes: > if( !ReadFile(id->h, pBuf, amt, &got, 0) ){ > got = 0; > } > > // PPD - XOR the buffer with a pattern so the disk file contents are not > in plain text > for (i = 0; i < got/4; i++) > { > *((DWORD *)((DWORD *)pBuf + i)) = (*((DWORD

RE: [sqlite] Encrypting data stored in database

2004-09-10 Thread Bob Dankert
Joey, You are going to have to excuse my ignorance of c++, but I am a bit confused as far as the ppdbuffersize and ppdbuffer. Is there additional code I would need to add elsewhere for these variables, and if so, would you mind including those as well?? I'm very sorry if this is really stupid, b

Re: [sqlite] temp files

2004-09-10 Thread D. Richard Hipp
Dmytro Bogovych wrote: On Fri, 10 Sep 2004 15:31:00 -0400, D. Richard Hipp <[EMAIL PROTECTED]> wrote: SQLite is using the temporary file to hold a statement-level rollback journal so that the partial results of the UPDATE can be rolled back if it encounters an error half way through. You can circum

RE: [sqlite] Encrypting data stored in database

2004-09-10 Thread Joey Blankenship
I'm including the routines that we modified. I hate to send the whole file around the entire list. The ppdbuffer and ppdbuffersize are set initially when the database is opened and closed. The current implementation may not be threadsafe, but we are single threaded. extern int ppdbuffersize;

Re: [sqlite] temp files

2004-09-10 Thread Dmytro Bogovych
On Fri, 10 Sep 2004 15:31:00 -0400, D. Richard Hipp <[EMAIL PROTECTED]> wrote: SQLite is using the temporary file to hold a statement-level rollback journal so that the partial results of the UPDATE can be rolled back if it encounters an error half way through. You can circumvent this by doing

Re: [sqlite] temp files

2004-09-10 Thread D. Richard Hipp
Dmytro Bogovych wrote: Greetings. I'm trying to run simple update update TREE set number = number + 1 where child = ? and parent = ? and number > ? During execution of this query the following func is called: static int sqlite3pager_opentemp(char *zFile, OsFile *fd) from pager.c and tempo

Re: [sqlite] Locking in 3.0.6

2004-09-10 Thread D. Richard Hipp
Steve O'Hara wrote: The audit logic is as follows; begin transaction select total from useractivity where event= . If lRows = 0 Then insert into useractivity .. Else update useractivity . End If commit transaction Is useractivity.event UNIQUE? Does it us

Re: [sqlite] temp files

2004-09-10 Thread Dmytro Bogovych
On Fri, 03 Sep 2004 17:17:24 +0300, Dmytro Bogovych <[EMAIL PROTECTED]> wrote: On Fri, 03 Sep 2004 17:07:36 +0300, Dmytro Bogovych <[EMAIL PROTECTED]> wrote: On Fri, 03 Sep 2004 09:12:31 -0400, D. Richard Hipp <[EMAIL PROTECTED]> wrote: Unable to reproduce. I put a breakpoint on sqlite3pa

RE: [sqlite] Encrypting data stored in database

2004-09-10 Thread Bob Dankert
Joey, Would you mind sharing the modifications you made to the os_win.c file? I would be interested in using such a modification, unfortunately, c++ isn't my strongest language. Thanks! Bob -Original Message- From: Joey Blankenship [mailto:[EMAIL PROTECTED] Sent: Friday, September 10,

Re: [sqlite] blob length SUM command

2004-09-10 Thread D. Richard Hipp
a a wrote: > > Is there a way to sum the blob lengths from a blob column without adding a > "blob length" integer column? > SELECT sum(length(x)) FROM table; -- D. Richard Hipp -- [EMAIL PROTECTED] -- 704.948.4565

Re: [sqlite] Newbie's first question about using SQLite in C++

2004-09-10 Thread WeiChin3
jb,   download the sqlite-source-3_0_6.zip file from http://www.sqlite.org/download.html. unzip it. build with the attached VC project file, you will end up with a sqlite3.lib static library.   You can build your project with this library and sqlite3.h file. These two files are all you need.

[sqlite] Newbie's first question about using SQLite in C++

2004-09-10 Thread JB
I should like to use SQLite from within a VC 2003 NET program. Is this documented somewhere? I do not know which parts to dowload, to start with. I downloaded the .dll but it comes with no .h file and now I am confused. Is there somewhere on the net a sort of tutorial or at least a C++ example?

Re: [sqlite] Encrypting data stored in database

2004-09-10 Thread Raymond Irving
Man this sounds great! I would really like to know where exactly I can make the changes to encrypt the database. I would even add a passkey feature (or xor string) that would be used to offer minor database obfuscation. Why don't the development group add something like this to the source? Is it

Re: [sqlite] blob length SUM command

2004-09-10 Thread Tiago Dionizio
select sum(length(col)) from t this should work, if i understand what you want. a a wrote: All, Is there a way to sum the blob lengths from a blob column without adding a "blob length" integer column? Would my architecture be more portable if I just added an integer "blob length" column? Mike

[sqlite] New DBD::SQLite*s

2004-09-10 Thread Matt Sergeant
Uploaded to CPAN are DBD::SQLite 1.05 and DBD::SQLite2 0.33 Changes for DBD::SQLite2: 0.33 - Set HAVE_USLEEP appropriately. This massively improves concurrent access to your SQLite DB. Changes for DBD::SQLite: 1.05 - Enabled HAVE_USLEEP where available which should massively

[sqlite] blob length SUM command

2004-09-10 Thread a a
All, Is there a way to sum the blob lengths from a blob column without adding a "blob length" integer column? Would my architecture be more portable if I just added an integer "blob length" column? Mike - Do you Yahoo!? Yahoo! Mail is new

RE: [sqlite] Encrypting data stored in database

2004-09-10 Thread Joey Blankenship
That's true. However we wanted to obfuscate everything about the database, including the sqlite header. Since our target is a PocketPC, field level encryption/decryption may have been too much of a performance burden. This was quick and easy, and although we're not using "real" encryption, it

Re: [sqlite] Encrypting data stored in database

2004-09-10 Thread Joey Blankenship
We made the mods in os_win.c, in the read and write routines, after the read and before the write. A more robust solution would have been to modify the code in os_mac.c and os_unix.c as well, but we didn't need that. It was very easy and the only caveat is that once you modify it, it will no

RE: [sqlite] Encrypting data stored in database

2004-09-10 Thread Hihn, Jason
In theory, ( have not tried this with SQLite) you caould make 2 add-in functions, encrypt(str) and decript(str) then use it as such: Select decrypt(sensitive_column) from table where id=3; Insert into table (sensitive_column) values (encrypt('3434 3434 3434 3434')) To provide field-level encrypt

[sqlite] No data with PRAGMA table_info

2004-09-10 Thread EzTools Support
When I issue PRAGMA table_info for an existing table, I get the column names back, but no values. Does it work for anyone else? TIA -brett -- try IeToolbox Passwords & Notes Keeper, Form Filler and much more www.ietoolbox.com

Re: [sqlite] Encrypting data stored in database

2004-09-10 Thread EzTools Support
Joey, Where in the code did you do that? Was it easy to put in one or two places? -brett try IeToolbox Passwords & Notes Keeper, Form Filler and much more www.ietoolbox.com Joey Blankenship wrote: Not to respond out of turn here, but we had a need to obfuscate the plain text (due to some users t

[sqlite] Locking in 3.0.6

2004-09-10 Thread Steve O'Hara
I'm wondering what logic I should employ to prevent mutual exclusion occurring. I'm using SQLite to record an audit trail from a web application - I count the number of edits, searches and the maximum number of concurrent users. Each user opens a connection to the database for the duration of thei

Re: [sqlite] Error: Can't find package sqlite

2004-09-10 Thread Lawrence Chitty
- Original Message - From: "Cena, Resty" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Tuesday, September 07, 2004 9:31 PM Subject: [sqlite] Error: Can't find package sqlite > Hi, > I'm trying to use TclSqlite, but when I try to load sqlite with the command: > > % package require sql

Re: [sqlite] sqlite.exe binary (windows)

2004-09-10 Thread rbundy
SQLite generating the "create index" SQL DDL statement at the end of the .dump output is the correct behaviour. In my experience using a number of different DBMSs, the sequence of data loading and then indexing is usually quicker than performing those operations the other way round. In a commerci