[sqlite] FW: Use of attach database

2009-07-20 Thread Sharma, Gaurav
Hi All, Can anybody look in to my query below and suggest me something helpful! With Best Regards Gaurav Sharma -Original Message- From: sqlite-users-boun...@sqlite.org [mailto:sqlite-users-boun...@sqlite.org] On Behalf Of Sharma, Gaurav Sent: Monday, July 20, 2009 11:57 AM To:

[sqlite] genfkey as loadable module (Re: Run genfkey on temp db from app)

2009-07-20 Thread Nicolas Williams
On Mon, Jul 20, 2009 at 08:34:52AM -0500, Jay A. Kreibich wrote: > If someone is going to take the time to refactor the genfkey code > into a stand-alone piece of code, I would like to suggest it is made > into it a loadable module, so that it can be used pretty much anywhere. That sounds

Re: [sqlite] Some SQL statements are not executing

2009-07-20 Thread Gary Verhaegen
On 20 Jul 2009, at 17:29, Simon Davies wrote: > As indicated inline, you are not handling error returns from sqlite3_step() > > This may not be the whole story, but ensure that you are not getting > an error returned. > > Regards, > Simon On 20 Jul 2009, at 17:26, Pavel Ivanov wrote: > Sounds

Re: [sqlite] Run genfkey on temp db from app

2009-07-20 Thread Jan
I am writing a tool to develop a database. Its basically a simple db browser and text editor. You can dump the whole database, edit it and restore it from text files. I thought it is a nice idea to have a "testing mode" where you load everything into a memory db (this is much faster).

Re: [sqlite] Run genfkey on temp db from app

2009-07-20 Thread Rich Shepard
On Mon, 20 Jul 2009, Kees Nuyt wrote: > After a dynamic development phase, most databases have a static schema. > At-run-time schema changes are usually a result of bad design. Run-time > schema changes on referential constraints are very unlikely. Kees, You said it much better than did I.

Re: [sqlite] Run genfkey on temp db from app

2009-07-20 Thread Kees Nuyt
On Mon, 20 Jul 2009 08:34:52 -0500, "Jay A. Kreibich" wrote: >On Mon, Jul 20, 2009 at 12:41:59PM +0200, Jan scratched on the wall: >> thank you roger. >> >> Seems it's not an easy task. Guess I should go through some c tutorials. >> Would be really nice to have this included in

Re: [sqlite] How do bitwise operators work?

2009-07-20 Thread Igor Tandetnik
Le Hyaric Bruno wrote: > But is there someone who can tell me where can I plug my specific > operators? You cannot provide your own operations, but you can provide your own functions: http://sqlite.org/c3ref/create_function.html Then you can write something

[sqlite] Detecting virtual/fts tables

2009-07-20 Thread Ben
Hi list, I'm the author of an SQL browser/editor application and would like to make use of FTS3. I have included the amalgamation (with SQLITE_ENABLE_FTS3 ) and all works happily. However, I would like to be able to detect which tables are virtual or which are related to virtual tables.

Re: [sqlite] Heirarchical queries question

2009-07-20 Thread Petite Abeille
On Jul 17, 2009, at 11:18 PM, Igor Tandetnik wrote: > This is known as a nested-set model: > > http://dev.mysql.com/tech-resources/articles/hierarchical-data.html Perhaps of interest as well: Trees in the database: Advanced data structures http://www.alberton.info/talks

Re: [sqlite] SQLite3 immune from injection attacks if file is readonly?

2009-07-20 Thread Matt Sergeant
On Sat, 18 Jul 2009 10:17:14 -0700, Kelly Jones wrote: > On a website, I want to take a user's query "as is", save it to a > userquery.txt, and then do: > > sqlite3 /path/to/mydb < userquery.txt > > where /path/to/mydb is a *read-only* file. > > Is there *any* risk of an injection attack here?

Re: [sqlite] How do bitwise operators work?

2009-07-20 Thread Rich Shepard
On Mon, 20 Jul 2009, Le Hyaric Bruno wrote: > But is there someone who can tell me where can I plug my specific > operators? And even is that feasible? Bruno, Can you provide examples of your schema, data, and the types of queries you want to run? This would make it easier to offer

Re: [sqlite] Some SQL statements are not executing

2009-07-20 Thread Simon Davies
2009/7/20 Gary Verhaegen : > Hi everybody, . . . > I have narrowed the problem to the few following lines : > > > #define DEBUG > > int db_execute(sqlite3 *db, char stmt[STR_LEN]) { > DEBUG   PRINT("\nentering db_execute with statement %s.", stmt); >       int ret=0; >  

Re: [sqlite] Some SQL statements are not executing

2009-07-20 Thread Pavel Ivanov
Sounds like you're running several instances of your application in several different processes simultaneously on the same database. Are you sure you don't do that? Pavel On Mon, Jul 20, 2009 at 11:08 AM, Gary Verhaegen wrote: > Hi everybody, > > I just subscribed and

[sqlite] Some SQL statements are not executing

2009-07-20 Thread Gary Verhaegen
Hi everybody, I just subscribed and this is my first post - I hope I am not making any deadly mistake by posting about a problem I have with SQLite. As the title suggests, I have some trouble with SQL statements randomly not executing. Here are the details. First, the machine. It is running a

Re: [sqlite] How do bitwise operators work?

2009-07-20 Thread Le Hyaric Bruno
Ok, thanks to you guys. But is there someone who can tell me where can I plug my specific operators? And even is that feasible? Bruno. ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Re: [sqlite] Run genfkey on temp db from app

2009-07-20 Thread John Elrick
Simon Slavin wrote: > On 20 Jul 2009, at 1:51am, Roger Binns wrote: > > >> Jan wrote: >> >>> Is it possible to move genfkey to sqlite itself (as a function) >>> or to c++ code? >>> >> I asked in February: http://www.sqlite.org/cvstrac/tktview?tn=3687 >> > > Rather than move

Re: [sqlite] The SQL Guide to SQLite

2009-07-20 Thread John Elrick
John Machin wrote: > On 20/07/2009 12:08 AM, P Kishor wrote: > >> unfortunately, we get either advertisements nowadays >> >> > > >> or a signature twice the length of the message warning us that the >> contents of the particular email are confidential and meant only for >> the

Re: [sqlite] Run genfkey on temp db from app

2009-07-20 Thread Jay A. Kreibich
On Mon, Jul 20, 2009 at 12:41:59PM +0200, Jan scratched on the wall: > thank you roger. > > Seems it's not an easy task. Guess I should go through some c tutorials. > Would be really nice to have this included in sqlite itself. If someone is going to take the time to refactor the genfkey code

Re: [sqlite] How do bitwise operators work?

2009-07-20 Thread John Machin
On 20/07/2009 11:05 PM, Le Hyaric Bruno wrote: > Hi, > > I'm making some testing with sqlite3. > I need to know how bitwise operator work? with which type? > Is that possible to use these operators on blob of thousands of bits? > > To give an idea of the context, I need to store a lot of data

Re: [sqlite] How do bitwise operators work?

2009-07-20 Thread Igor Tandetnik
Le Hyaric Bruno wrote: > I need to know how bitwise operator work? Same as in C or C++. > with which type? With integers. > Is that possible to use these operators on blob of thousands of bits? Not to my knowledge. For something like that, consider writing a custom function. Igor Tandetnik

[sqlite] How do bitwise operators work?

2009-07-20 Thread Le Hyaric Bruno
Hi, I'm making some testing with sqlite3. I need to know how bitwise operator work? with which type? Is that possible to use these operators on blob of thousands of bits? To give an idea of the context, I need to store a lot of data (issued from code coverage analysis). I'm trying to store this

Re: [sqlite] Run genfkey on temp db from app

2009-07-20 Thread Rich Shepard
On Sun, 19 Jul 2009, Roger Binns wrote: > Bringing things full circle, that is exactly what the genfkey > functionality does. It parses the foreign key constraints and generates a > set of triggers to ensure they are enforced. It used to be a separate > program until it was moved into the shell

Re: [sqlite] Multiple Writers and Database is Locked Problems

2009-07-20 Thread Edzard Pasma
The "database is locked" error may occur on a select as well, in case a writer has spilt changes to disk. This is mentioned in http://sqlite.org/lockingv3.html. It would be SQLITE_BUSY and not SQLITE_LOCKED, as is the subject in the document you refer to. Is that possible? Then you'd need busy

[sqlite] Use of attach database

2009-07-20 Thread Sharma, Gaurav
Hi All, I assume, it's the right place to send this mail regarding some issues that I have notice while using sqlite latest version 3.6.16. I have recently moved from sqlite version 3.6.1 to 3.6.16 and while executing the command "attach database ':memory:' as db2" I experience the crash in my

Re: [sqlite] Run genfkey on temp db from app

2009-07-20 Thread Jan
thank you roger. Seems it's not an easy task. Guess I should go through some c tutorials. Would be really nice to have this included in sqlite itself. Roger Binns schrieb: > -BEGIN PGP SIGNED MESSAGE- > Hash: SHA1 > > Jan wrote: >> Is it possible to move genfkey to sqlite itself (as a

[sqlite] Use of attach database

2009-07-20 Thread Sharma, Gaurav
Hi All, I assume, it's the right place to send this mail regarding some issues that I have notice while using sqlite latest version 3.6.16. I have recently moved from sqlite version 3.6.1 to 3.6.16 and while executing the command "attach database ':memory:' as db2" I experience the crash in my