Re: [sqlite] How safe is sqlite3_prepare compared to sqlite3_exec?

2006-11-30 Thread John Stanton
As Igor very astutely pointed out, the other very strong benefit of this approach is that you always bind to a compiled SQL statement and quarantine your application from the possibility of having a malicious SQL attack. You win on all counts. John Stanton wrote: Sqlite3_exec is merely

Re: [sqlite] sqlite_open

2006-11-30 Thread John Stanton
Once it is explained a bug becomes a feature and at worst an annoyance. :-) It is a tiny change to Sqlite to make it the way you want it to work. In my systems I have not changed Sqlite but instead put a jacket around sqlite3_open and tested first for the existence of the file if I don't want

Re: [sqlite] Re: sqlite_open

2006-11-30 Thread John Stanton
Dave Dyer wrote: I discovered when I started testing my model that it created a file called ' .db'. It took me a while to figure out the error. Now, I test for empty databases and empty fields before trying to use them. :-) It goes deeper. I did install a "file exists" check pretty early

Re: [sqlite] Re: sqlite_open

2006-11-30 Thread John Stanton
Those are Macintosh issues, not Sqlite, and you need to handle them in your application. Dave Dyer wrote: t ??? Sqlite is agnostic about file names. Give it a pathname to suit the underlying file system and it is happy. You might be using some wrapper that messes with pathnames, but that

Re: [sqlite] Re: sqlite_open

2006-11-30 Thread John Stanton
Dave Dyer wrote: At 08:04 PM 11/30/2006, John Stanton wrote: Those are Macintosh issues, not Sqlite, and you need to handle them in your application. Yes indeed. I'm only suggesting that sqlite would be a better substrate if it provided a supported way to tell me "I can't

Re: [sqlite] Query on database operations.

2006-12-01 Thread John Stanton
Tummala wrote: Hi John, Thanks for your help. I have another doubt? If I turn off the sql compiler, should I have to fix my insert,delete,select,update operations? My operations are almost fixed in nature. Can you tell me how exactly I do this? -Original Message- From: John Stanton [mailto

Re: [sqlite] Preallocating fixed disk space for database ...

2006-12-01 Thread John Stanton
You could look at the Sqlite data structures and write a program to build the free pages list. I still don't understand why you need to pre-allocate space. If you are using Linux or Unix you can make a file system of a fixed size for the DB. On Windows you could partition the disk into a

Re: [sqlite] Preallocating fixed disk space for database ...

2006-12-01 Thread John Stanton
I cannot see a reason for what you propose, but you could do it by brute force and ignorance - populate the DB with 1 million rows then delete them all to add all the space to the free pages list. Then your insertions will use the freed pages, not fresh ones. kamil wrote: I want to

Re: [sqlite] for what reason :memory: is much slower than /dev/shm/dummy.db

2006-12-01 Thread John Stanton
You might discover that a memory based database has few advantages over a disk based one, since Sqlite uses cacheing and the OS uses virtual memory file cacheing. The main difference might be initial accesses being slower while the cache fills up. I understand that Sqlite uses a less

Re: [sqlite] Preallocating fixed disk space for database ...

2006-12-01 Thread John Stanton
in that nonsense any more. Rob Sciuk wrote: On Fri, 1 Dec 2006, John Stanton wrote: I cannot see a reason for what you propose, but you could do it by brute force and ignorance - populate the DB with 1 million rows then delete them all to add all the space to the free pages list. Then your

Re: [sqlite] for what reason :memory: is much slower than /dev/shm/dummy.db

2006-12-01 Thread John Stanton
Eduardo Morras wrote: At 09:34 01/12/2006, you wrote: Hi there, we are on an challanging project with very high requirements on performance. When doing some debugging we discover, that the sqlite method for creating an memory-based database is much slower than using e.g /dev/shm on linux

Re: [sqlite] compiler option SQLITE_OMIT_SQLITE_OMIT_PARSER

2006-12-01 Thread John Stanton
You send it SQL statements. It has to parse and compile them for execution. The parser understands the grammar of SQL and applies it. Noah Hart wrote: Hello all, I've read the documentation, and the wiki and the pages at http://www.sqlite.org/compile.html However, I cannot find what is the

Re: [sqlite] Dealing with dates in the format yyyymmdd

2006-12-03 Thread John Stanton
Why not use the internal Sqlite date format. Then date processing is straight forward and you can use the conversion routines to present it in the various national and ISO formats. Sqlite uses a very correct date storage format based on an epoch way back in antiquity so that you can present

Re: [sqlite] Dealing with dates in the format yyyymmdd

2006-12-03 Thread John Stanton
that have the integer format mmdd. How would I convert that (at import) to the SQLite date format? I do the import via an ADO recordset and then move the data via SQLite inserts. RBS -Original Message----- From: John Stanton [mailto:[EMAIL PROTECTED] Sent: 03 December 2006 17:01 To: sq

Re: [sqlite] Dealing with dates in the format yyyymmdd

2006-12-03 Thread John Stanton
eans given the year, the month number and day number you can make a date? RBS -Original Message----- From: John Stanton [mailto:[EMAIL PROTECTED] Sent: 03 December 2006 18:23 To: sqlite-users@sqlite.org Subject: Re: [sqlite] Dealing with dates in the format mmdd What do you mean b

Re: [sqlite] Dealing with dates in the format yyyymmdd

2006-12-03 Thread John Stanton
Message- From: John Stanton [mailto:[EMAIL PROTECTED] Sent: 03 December 2006 20:03 To: sqlite-users@sqlite.org Subject: Re: [sqlite] Dealing with dates in the format mmdd It looks like Interbase uses a traditional date format based on an epoch. That is a system where a base date is set

Re: [sqlite] Dealing with dates in the format yyyymmdd

2006-12-03 Thread John Stanton
ons are available, as follows: 1. date( timestring, modifier, modifier, ...) ? Will give that a go. RBS -----Original Message- From: John Stanton [mailto:[EMAIL PROTECTED] Sent: 03 December 2006 20:46 To: sqlite-users@sqlite.org Subject: Re: [sqlite] Dealing with dates in the format yy

Re: [sqlite] database permanently locked

2006-12-03 Thread John Stanton
Have you tried using lsof to report what is holding your file open? Can you copy the file? Max Barry wrote: Christian Smith wrote: Max Barry uttered: My database is permanently locked, and I've spent two fruitless days trying to unlock it. You haven't said what sort of box this is. I

Re: [sqlite] Dealing with dates in the format yyyymmdd

2006-12-03 Thread John Stanton
- From: John Stanton [mailto:[EMAIL PROTECTED] Sent: 03 December 2006 23:30 To: sqlite-users@sqlite.org Subject: Re: [sqlite] Dealing with dates in the format mmdd I know nothing of Interbase, but cannot imagine that it does not have a set of date manipulation functions. RB Smissaert

Re: [sqlite] Dealing with dates in the format yyyymmdd

2006-12-03 Thread John Stanton
in an Excel sheet. RBS -Original Message- From: John Stanton [mailto:[EMAIL PROTECTED] Sent: 04 December 2006 00:41 To: sqlite-users@sqlite.org Subject: Re: [sqlite] Dealing with dates in the format mmdd I suspect that you are not using the Interbase date type, which is a 64 bit object

Re: [sqlite] Batching functions

2006-12-03 Thread John Stanton
How about running a daemon on your machine which gets the request from your user defined function, does the lookup with a persistent connection and asynchronously updates the row in the DB? It does not need to be a daemon, it could be a thread in your program if that is more apprpriate. When

Re: [sqlite] Dealing with dates in the format yyyymmdd

2006-12-04 Thread John Stanton
are fine as well when dumped in an Excel sheet. RBS -Original Message- From: John Stanton [mailto:[EMAIL PROTECTED] Sent: 04 December 2006 00:41 To: sqlite-users@sqlite.org Subject: Re: [sqlite] Dealing with dates in the format mmdd I suspect that you are not using the Interbase date

Re: [sqlite] is blob compression worth it

2006-12-04 Thread John Stanton
What are you using for compression? Have you checked that you get a useful degree of compression on that numeric data? You might find that it is not particularly amenable to compression. Hickey, Larry wrote: I have a blob structure which is primarily doubles. Is there anyone with some

Re: [sqlite] Dealing with dates in the format yyyymmdd

2006-12-04 Thread John Stanton
It is a very common algorithm. From memory it is implemenented in Sqlite, for example. [EMAIL PROTECTED] wrote: can convert to seconds since start of epoch, do the arithmetic, then convert back Don't get you. It would be quite a calculation, with leap years etc. RBS On Sun, Dec 03,

Re: [sqlite] Re: Re: ip2long

2006-12-04 Thread John Stanton
Kevin Waterson wrote: This one time, at band camp, "Igor Tandetnik" <[EMAIL PROTECTED]> wrote: I don't quite understand. To continue your example, exactly which IP addresses are considered to fall into the range "65536"? How do you figure 1.2.3.4 is in this range, if indeed it is? The

Re: [sqlite] Re: Re: ip2long

2006-12-04 Thread John Stanton
Kevin Waterson wrote: This one time, at band camp, John Stanton <[EMAIL PROTECTED]> wrote: It looks as if you are looking to see if an address belongs to a particular class B network. Are all your searches done that way? If they are you may be able to use a regular expression to d

Re: [sqlite] Re: Re: ip2long

2006-12-04 Thread John Stanton
Kevin Waterson wrote: This one time, at band camp, John Stanton <[EMAIL PROTECTED]> wrote: Are you actually searching for membership in a class A, B or C network or perhaps a subnet? If you are you can use the dotted format to your advantage. No, The search is for which registr

Re: [sqlite] Re: Re: ip2long

2006-12-05 Thread John Stanton
Kevin Waterson wrote: This one time, at band camp, "Trevor Talbot" <[EMAIL PROTECTED]> wrote: I'd store the IPs in the DB in integer form as Lloyd suggested, if range queries are your goal. Do conversion to and from display format in the application. Yes, they are stored as INTEGER. and

Re: [sqlite] using precompiled queries and turning off sql parser at compile time

2006-12-05 Thread John Stanton
Youm need to contact Dr Hipp about that. I understand he has a special embedded version of sqlite which omits the compiler and uses pre-compiled VDBE code to reduce the footprint. Kalyani Tummala wrote: Hi, In one of the group mails I have read about precompiled queries to improve the

Re: [sqlite] a question about muticonnection

2006-12-06 Thread John Stanton
hongdong wrote: I just have a base question: assume user A and user B now both connection to a same database and both of them want to update a same record,but only one is allowed in this condition: A begin to browse the data in a client application,and load rowid into GUI and keep it in

Re: [sqlite] Re: Unicode Help

2006-12-06 Thread John Stanton
Marten Feldtmann wrote: Ulrich Schöbel schrieb: SQLite includes a Tcl API. Tcl does all these conversions with ease. See the encoding convertto/convertfrom commands and fconfigure But Tcl is not part of SQLite (and this is good) - this is just an add-on. The idea with the additional

Re: [sqlite] a question about muticonnection

2006-12-06 Thread John Stanton
Nicolas Williams wrote: On Wed, Dec 06, 2006 at 10:04:42AM -0600, John Stanton wrote: hongdong wrote: I just have a base question: assume user A and user B now both connection to a same database and both of them want to update a same record,but only one is allowed in this condition

Re: [sqlite] Re: Unicode Help

2006-12-06 Thread John Stanton
Nicolas Williams wrote: On Wed, Dec 06, 2006 at 10:06:12AM -0600, John Stanton wrote: Marten Feldtmann wrote: But Tcl is not part of SQLite (and this is good) - this is just an add-on. The idea with the additional functions are pretty good ! How does Sqlite become Sqbloated? By function

Re: [sqlite] a question about muticonnection

2006-12-06 Thread John Stanton
Nicolas Williams wrote: On Wed, Dec 06, 2006 at 11:36:11AM -0600, John Stanton wrote: I fully understood. It is an age old problem that has puzzled generations of system designers. My first exposure was over thirty years ago. The approach we discovered worked was to treat

Re: [sqlite] is blob compression worth it

2006-12-08 Thread John Stanton
that in this case would just save a reference to another blob if it's identical. I guess this could save a lot of space without any fancy decompression algorithm, and if the blob-field is already indexed there would be no extra time to locate the other identical blobs :) Just a thought :) John

Re: [sqlite] sqlite3_column_double - problems when assigning values to variable

2006-12-08 Thread John Stanton
Maybe your statement does not reference a valid row. Marten Feldtmann wrote: I have written some interface code to the sqlite3 API using the OpenWatcom 1.5 compiler and I wrapped several functions like sqlite3_column_text, sqlite3_column_int and all went fine. Then I tried to wrap

Re: [sqlite] windows dll

2006-12-11 Thread John Stanton
I agree with you 100%. Statically linking Sqlite to applications gives you some freedom from "DLL HELL" and "REV LOCK SHOCK" and can only result in inefficiency if you have multiple different application programs using Sqlite on the individual workstation. To my way of implementing KISS,

Re: [sqlite] faster SELECT time on second run

2006-12-11 Thread John Stanton
Use a Unix read or a Windows API ReadFile and read the whole file in one call. Find the size of it using a Unix lseek or Win32 API GetFileSize call. You will certainly pull the whole file into VM that way. Jay Sprenkle wrote: On 12/11/06, Dennis Cote <[EMAIL PROTECTED]> wrote: Simply

Re: [sqlite] cursor question

2006-12-12 Thread John Stanton
Cursors as such are not implemented. You can achieve the function of a cursor from Sqlite with some thought. Jim Crafton wrote: Does the latest version of sqlite have cursors? If so, where might I find docs on using them? Thanks Jim C

Re: [sqlite] sqllite ddb from win to linux

2006-12-12 Thread John Stanton
Could be an FTP in ASCII mode copy problem. [EMAIL PROTECTED] wrote: "Rob Coenen" <[EMAIL PROTECTED]> wrote: yes that is what I tried; I did use sqlite3 does not work. Any known problems on moving db files from Win to Linux? SQLite database files are cross-platform. They work on linux,

Re: [sqlite] Re: File Syste

2006-12-13 Thread John Stanton
The Sqlite API is fully documented and the source code is clearly written and commented and reads quite simply as a definition of its philosophy and function. Cesar Rodas wrote: I mean.. is there a manual that explain how to use SQLite Core in low level API, like berkeley DB, without SQL.

Re: [sqlite] Re: File Syste

2006-12-13 Thread John Stanton
It is hard to imagine why you would want to use Sqlite B-Tree access. Kees Nuyt wrote: On Wed, 13 Dec 2006 13:02:37 -0400, you wrote: I mean the SQLite Core API, something like Berkeley DB. I'd like to use SQLite B+tree API. It has quite recently been discussed, you may want to try to

Re: [sqlite] Re: File Syste

2006-12-13 Thread John Stanton
If you are using a B-Tree index for a file system why incorporate Sqlite, why not just write the file system code? B-Trees are well documented. Cesar Rodas wrote: I am developing a File System, and I'd like to use B+ Tree and not lost time and CPU understanding SQL... On 13/12/06, John

Re: [sqlite] Problem with sqlite3 on CGI scripts with ANSI C

2006-12-15 Thread John Stanton
How do you set the working directory? Where is your Sqlite DB file? You are just opening a file name, not a pathname so your working directory is whatever your web server uses for CGI data. Francesco Andrisani wrote: Hi comunity, i have the follow problem. I've insert into a C-CGI page a

Re: [sqlite] SQL extension

2006-12-16 Thread John Stanton
The questioner might find that user functions will extend the capability to do what he wants without implementing new SQL syntax. Joe Wilson wrote: http://www.sqlite.org/cvstrac/fileview?f=sqlite/src/parse.y=1.210 --- Dusan Gibarac <[EMAIL PROTECTED]> wrote: What are our options to extend or

Re: [sqlite] SQLITE_BUSY scenario

2006-12-16 Thread John Stanton
Dixon Hutchinson wrote: The basic problem is that I am getting SQLITE_BUSY on a call to sqlite3_exec where the SQL passed is simply "COMMIT;" Notes: 1. This in on a WIN32 platform. 2. There is only one process (the main process) that makes any calls to sqlite3 for the DB in question.

Re: [sqlite] Is sqlite the right db for me?

2006-12-16 Thread John Stanton
I would endorse Roger's comments. A web interface can give you everything you can get from a stand-alone application but also gives you flexibility. The greatest advantage of the web application is that you have no software loading onto PCs, a real nuisance. As long as the browser works

Re: [sqlite] Is sqlite the right db for me?

2006-12-17 Thread John Stanton
I can imagine that before long all firefighters will have internet connected equipment. A handheld device with broadband access and GPS is an obvious move forward, both for safety, for rapid deployment of resources and for access to maps and logistics. To design what you are doing now for

Re: [sqlite] Calculate years and months difference with Julian Date?

2006-12-17 Thread John Stanton
Have a look at Sqlite date code. I just lifted its data structures and used its functions to build user functions to give month etc. The algorithms are accurate and they are easy to use. I found setting up user functions to do those calculations made the SQL simpler. The functions are in a

Re: [sqlite] Calculate years and months difference with Julian Date?

2006-12-17 Thread John Stanton
I answered your question. It is possible and showed you how to do it. The rest is up to you. RB Smissaert wrote: I am not into C and I want to stay clear from compiling SQLite. Or do I misunderstand this? RBS -Original Message- From: John Stanton [mailto:[EMAIL PROTECTED] Sent: 17

Re: [sqlite] SQL error: near "READ_ONLY": syntax error

2006-12-18 Thread John Stanton
Look here - http://www.sqlite.org/lang_transaction.html LuYanJun wrote: > Thanks, But I step the instruction fellow the hint by offcial document by > which said that's correct(BTW forgive me my poor english ): > http://www.sqlite.org/concurrency.html > 4.1 Read-only transactions > BEGIN

Re: [sqlite] delayed (batch) transactions

2006-12-20 Thread John Stanton
It is the same problem as trying to get a quart out of a pint bottle. People looking for durability and higher performance might find that using 15,000 RPM disks will do it without affecting durability or requiring an application redesign. Experimentation with multiple disk spindles so that

Re: [sqlite] Mathematical 'power' operator?

2006-12-21 Thread John Stanton
We have a rule which gets anyone who says "it would be easiest to..." is sent to the sin bin until they learn to way "the best way to do this is ...". The best way generally turns out to be the easiest, but the easiest never turns out to be the best. Tom Briggs wrote: I'm sure that

Re: [sqlite] Possible Memory Leak

2006-12-21 Thread John Stanton
Your program does not free the memory malloc'd by sqlite3_errmsg by calling sqlite3_free. I guess that Valgrind is telling you that. You don't have to worry about Sqlite. Jose Miguel Goncalves wrote: Hi, Running a simple sqlite3_open()/sqlite3_close() program (attached) I get a report of

[sqlite] Embedded Database Functions

2006-12-21 Thread John Stanton
There has been discussion about extending Sqlite to have more functions, but the risk is creating Sqlite-Bloat and losing the most endearing feature of the product, its light weight and simplicity. Here is an interesting and thought provoking discussion on the general subject. A good case is

Re: [sqlite] Embedded Database Functions

2006-12-24 Thread John Stanton
A compiler for a subset of PL/SQL would not be too arduous a project, and a code generator into VDBE would, as you suggest, give an insight into what extra opcodes would be desirable to produce dense PL/SQ. Obviously the SQL component and optimization is already handled. I can see that the

Re: [sqlite] Embedded Database Functions

2006-12-24 Thread John Stanton
Andrew Piskorski wrote: On Sun, Dec 24, 2006 at 09:35:01AM -0600, John Stanton wrote: There is even a starting grammar for you: http://www.antlr.org/grammar/1107752678378/PLSQLGrammar.g A compiler for a subset of PL/SQL would not be too arduous a project, If what you want is something

Re: [sqlite] Embedded Database Functions

2006-12-24 Thread John Stanton
VDBE code already exists so that is not an uncharted route. Eduardo Morras wrote: At 17:00 24/12/2006, you wrote: On Sun, Dec 24, 2006 at 09:35:01AM -0600, John Stanton wrote: > >There is even a starting grammar for you: > > http://www.antlr.org/grammar/1107752678378/PL

Re: [sqlite] date - SQL extraction from day, month and year

2006-12-26 Thread John Stanton
Everybody? Most Sqlite users know that Sqlite implements a DATE type and has date support functions. Karsten Koschinski wrote: Hey, I have a database with a field where dates are stored! As everybody knows SQLite has no special date support such as a special datatype for date or something

Re: [sqlite] date - SQL extraction from day, month and year

2006-12-26 Thread John Stanton
your own user functions for more detailed date manipulation. Anderson, James H (IT) wrote: Where are the date support functions documented? -Original Message- From: John Stanton [mailto:[EMAIL PROTECTED] Sent: Tuesday, December 26, 2006 12:40 PM To: sqlite-users@sqlite.org Subject: Re

Re: [sqlite] date - SQL extraction from day, month and year

2006-12-26 Thread John Stanton
would be a good feature. --- John Stanton <[EMAIL PROTECTED]> wrote: Everybody? Most Sqlite users know that Sqlite implements a DATE type and has date support functions. Karsten Koschinski wrote: Hey, I have a database with a field where dates are stored! As everybody knows

Re: [sqlite] date - SQL extraction from day, month and year

2006-12-26 Thread John Stanton
ATE" to its list of built-in types. Just as the SQLite authors saw the merit of adding integers, doubles and blobs to SQLite 3 from the text-only SQLite 2, I believe there is a compelling case for adding a proper DATE type in a future version of SQLite. --- John Stanton <[EMAIL PROTECTED]&

Re: [sqlite] date - SQL extraction from day, month and year

2006-12-26 Thread John Stanton
n official DATE type, such inconsistancies could be avoided, and the underlying storage of DATEs could be consistant across all applications and could potentially be stored in a more space-efficient form in the database file, as an added bonus. --- John Stanton <[EMAIL PROTECTED]>

Re: [sqlite] date - SQL extraction from day, month and year

2006-12-26 Thread John Stanton
that I did not write. The truth is it's probably too late for SQLite3 to have an official DATE type since the API is more or less frozen. Such a new type could only be added in a hypothetical SQlite4 - which may never happen. I give up. --- John Stanton <[EMAIL PROTECTED]> wrote: If d

Re: [sqlite] sqlite performance, locking & threading

2006-12-28 Thread John Stanton
I am curious as to how multiple threads would perform faster inserts into an Sqlite database, which is a single file plus the journal. Are you using a multiple processor machine? Emerson Clarke wrote: Roger, Thanks for the suggestions. I think using a worker thread and a queue would be

Re: [sqlite] sqlite performance, locking & threading

2006-12-30 Thread John Stanton
Good advice. If you want to experiment with a certain architecture, write the programs yourself rather than trying to get others to do it for you. Sqlite is a well thought through solution for an embedded database with a wide range of applications, but if you want something more specialised,

Re: [sqlite] retrieve num-rows from a result

2007-01-01 Thread John Stanton
You need to count the number of rows as you sqlite3_step and get each one. A DB only knows how many rows are in a selection after it has read them all. Ohad Eder-Pressman wrote: just started using sqlite through a c++ wrapper. i need to be able to know how many rows are contained in a

Re: [sqlite] can i dynamically move backward and forward in a record-set ?

2007-01-01 Thread John Stanton
A step performs a get of the next row. Whether it is next of previous depends upon the SQL. Ohad Eder-Pressman wrote: after a query i get back the result set. it looks like i can only do a 'step' to move one record forward. is there any way i can move back and forward to any index i like ? i

Re: [sqlite] can i dynamically move backward and forward in a record-set ?

2007-01-02 Thread John Stanton
A very simple and efficient method of holding temporary results is to just read it into a temporary file which is memory mapped. The VM manager takes care of the memory buffering so you do not have to be concerned about upper size limits being constrained by memory resources. The file can be

Re: [sqlite] can i dynamically move backward and forward in a record-set ?

2007-01-02 Thread John Stanton
My original use of this method was in a program which would literally run for years. An implementation which would checkerboard the heap would ultimately cause problems despite the absence of leaks. Both Unix and Windows support this POSIX feature, and both permit anonymous allocation so it

Re: AW: [sqlite] sqlite performance, locking & threading

2007-01-04 Thread John Stanton
If Emeroson intuitively understood the essential architecture of the PC he is using he would not be having difficulty with his concept of how to use it. It is essentially a serial device, multi-tasking device and parallelism in the forms of threading and multi processing is a sophistication

Re: AW: [sqlite] sqlite performance, locking & threading

2007-01-04 Thread John Stanton
hould be designing for, not the hardware... As it happens, the newest generation of PC's are all multi-core, and i have been working on multi processor environments for many years. Emerson On 1/4/07, John Stanton <[EMAIL PROTECTED]> wrote: If Emeroson intuitively understood the essenti

Re: [sqlite] When to release version 3.3.10?

2007-01-05 Thread John Stanton
We were influenced by Deming's work on total quality. He advocates fixing each problem the moment it is identified and taking great pains never to ship product with defects. That way quality is maximized, The short term invonvenience is swamped by the long terms advantages. I would agree

Re: AW: [sqlite] sqlite performance, locking & threading

2007-01-05 Thread John Stanton
error and there is still a reasonable level of safety checking for users who do not synchronise properly. Emerson On 1/5/07, John Stanton <[EMAIL PROTECTED]> wrote: Work on turning "reasonable" into "adequate" or "good" and it will help you get an intui

Re: [sqlite] how long should a single insert take?

2007-01-05 Thread John Stanton
You are experiencung the ACID feature of Sqlite. To insert faster group your inserts into a single transaction. Sean Payne wrote: Hi, I'm new to the list and to SQLITE. I am using it as a backend for a gui program I'm working on. However, I am measuring a single trivial insert using the C

Re: [sqlite] sqlite performance, locking & threading

2007-01-06 Thread John Stanton
Bill King wrote: Roger Binns wrote: Im sorry for being so harsh, and i know im not winning any friends here, So far noone has agreed with you :-) This would be incorrect. The correct statement is "so far no one has vocally agreed with you". If people didn't agree, this whole once

Re: [sqlite] html output with added tag brackets

2007-01-06 Thread John Stanton
Why not just make a simple change to sqlite3.exe? You have the source. T wrote: Hi all, Following up my earlier question, since no replies: I want to use SQLite's html output option to deliver query results as a series of HTML rows. But I also want to insert extra HTML tags in the

Re: [sqlite] When to release version 3.3.10?

2007-01-06 Thread John Stanton
e some of the products are still at 3.3.8. Doing a release is a non-trivial undertaking. John Stanton <[EMAIL PROTECTED]> wrote: We were influenced by Deming's work on total quality. He advocates fixing each problem the moment it is identified and taking great pains never to ship product

Re: [sqlite] html output with added tag brackets

2007-01-06 Thread John Stanton
The sqlite3 program is just an application program using the sqlite lbrary. If you have your own version of it is will be compatible with all Sqlite V3 databases. What changes with an Sqlite release is the library that you link into your application. T wrote: Hi John, But, then I need an

Re: [sqlite] html output with added tag brackets

2007-01-06 Thread John Stanton
An example of Sqlite use is in one of our applications ehere we output from Sqlite in XML according to a predefined DTD (HTML is XML defined by a particular DTD). It is achieved by a layer of software which calls the Sqlite library API. The result is structured data which can be fed to

Re: [sqlite] how would you allow users to re-order rows arbitrarily?

2007-01-06 Thread John Stanton
Traditionally that is achieved by a doubly linked list. Each row contains a pointer to the next and previous row and a null for the end case. The linked list structure cannot fail regardless of the amount of shuffling or the size. Sean Payne wrote: Suppose gui-users wanted to drag and drop

Re: [sqlite] Sqlite design question

2007-01-09 Thread John Stanton
Consider having multiple databases. One can have all the read only tables for example and will therefore always be available for reading. Dynamic tables would be in another. You can increase the granularity by having more databases, perhaps as many as one per dynamic table, depending on the

Re: [sqlite] multiuser DB on network share

2007-01-09 Thread John Stanton
That should work quite well. We use such a strategy to implement remote, multi user access to Sqlite databases. the user is unconcerned about locking or contentions. In our case we made the server run on port 80 (HTTP) and use regular HTTP protocol so that it easily penetrates firewalls.

Re: [sqlite] multiuser DB on network share

2007-01-09 Thread John Stanton
the permission has been granted by the socketserver. Once the INSERT/UPDATE has been made, another call is made to the socketserver to unlock the database. The socketserver will then notify the other clients that an update has been made. Best regards Daniel John Stanton wrote: That should work quite

Re: [sqlite] multiuser DB on network share

2007-01-11 Thread John Stanton
An elegant explanation. Write a book about it! Roger Binns wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Jay Sprenkle wrote: This sounds exactly like what causes the trashed shared MS Access databases I've seen and network locking issues I see warnings about here. No it isn't.

Re: [sqlite] multiuser DB on network share

2007-01-11 Thread John Stanton
An Sqlite redirector which runs as a daemon on the machine hosting the DB and has an API which provides the Sqlite API calls for remote clients would solve these networking problems and maintain application code compatibility. The sqlite3_open call would detect that the DB was remote and the

Re: [sqlite] Sqlite Preprocessor

2007-01-11 Thread John Stanton
My understanding is that he is advocating a compiler which would take his definition of an Sqlite operation and generate correct Sqlite3 API calls. An existing wrapper could well satisfy his requirement. Joe Wilson wrote: I not sure what you mean by preprocessor, but if you mean a "stored

Re: [sqlite] multiuser DB on network share

2007-01-11 Thread John Stanton
alone, add on. Fred -Original Message----- From: John Stanton [mailto:[EMAIL PROTECTED] Sent: Thursday, January 11, 2007 9:24 AM To: sqlite-users@sqlite.org Subject: Re: [sqlite] multiuser DB on network share An Sqlite redirector which runs as a daemon on the machine hosting the DB and has an

Re: [sqlite] Sqlite Preprocessor

2007-01-11 Thread John Stanton
of inserting an additional layer, the actual code could be compiled inline into the sourcing C file, thus a pre processor. I'll give this a quick first pass when I get some free time, how difficult could it really be ? would anyone be interested in this as a project? John Stanton <[EM

Re: [sqlite] Sqlite Preprocessor

2007-01-11 Thread John Stanton
It was one of the poorly thought through concepts which slipped into the ash can of history without mourners. To be reliable such a tool needs to be integrated into the development system so that a change in schema forces a remake of all affected applications. With discipline and the

Re: [sqlite] Sqlite Preprocessor

2007-01-11 Thread John Stanton
Why would it be a benefit? You would have to be doing type conversions all the time. Ken wrote: I think the fact that sqlite is typeless actually is a benefit. I see what you mean now about connecting to obtain the meta info. Maybe that could be embedded in the code as well for the

Re: [sqlite] Sqlite Preprocessor

2007-01-11 Thread John Stanton
How about when you have a twos complement integer in your program and Sqlite decides to return a character string? Ken wrote: From the standpoint of data insertions you wouldn't reall need to deal with datatype correctness since sqlite is typeless. John Stanton <[EMAIL PROTECTED]>

Re: [sqlite] Sqlite Preprocessor

2007-01-11 Thread John Stanton
s typeless. John Stanton <[EMAIL PROTECTED]> wrote: Why would it be a benefit? You would have to be doing type conversions all the time. Ken wrote: I think the fact that sqlite is typeless actually is a benefit. I see what you mean now about connecting to obtain the meta info. Maybe that c

Re: [sqlite] 3.3.10 data corruption on updating fts1 string table

2007-01-11 Thread John Stanton
How are you calling Sqlite? Have you tried sqlite3.exe? ohadp wrote: Scott Hess <[EMAIL PROTECTED]> writes: CREATE VIRTUAL TABLE t USING fts1(content); INSERT INTO t (rowid, content) VALUES (1, 'this is a test'); UPDATE t SET content = 'that was a test' WHERE rowid = 1; -- The

Re: [sqlite] multiuser DB on network share

2007-01-11 Thread John Stanton
Thankyou for the excellent reference. Roger Binns wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 John Stanton wrote: An elegant explanation. Write a book about it! Chris Hertel already did. This is the bit about oplocks: http://ubiqx.org/cifs/SMB.html#SMB.10.1 The index has

Re: [sqlite] 3.3.10 data corruption on updating fts1 string table

2007-01-11 Thread John Stanton
In that case your problem will be in your code, specifically in the function which gives you a pointer to the data. Show us your code. ohadp wrote: i'm linking with it and calling the api directly. i think that sqlite3.exe doesn't have fts1 support in it. John Stanton wrote: How are you

Re: [sqlite] A Build Question

2007-01-12 Thread John Stanton
When I build GNU C for example it works that way by default. Rich Shepard wrote: As 3.3.10 builds here I want to ask why it's done from a directory different from that of the source? I believe sqlite3 is the only application I've build using the standard suite of build tools (autoconf,

Re: [sqlite] Pager modification question

2007-01-12 Thread John Stanton
If Sqlite were to implement its own locking then it would lose simplicity and versatility. A good way to regard Sqlite is a replacement for fopen. It is a way an application can access a single file. If you want more than that you are not looking for "'lite" and should go straight to

Re: [sqlite] Pager modification question

2007-01-12 Thread John Stanton
. Ken John Stanton <[EMAIL PROTECTED]> wrote: If Sqlite were to implement its own locking then it would lose simplicity and versatility. A good way to regard Sqlite is a replacement for fopen. It is a way an application can access a single file. If you want more than th

Re: [sqlite] DROP INDEX not freeing up memory

2007-01-16 Thread John Stanton
the index once costs a lot of memory, and then future deletions/creations does not change the amount of memory allocated. -Original Message- From: John Stanton [mailto:[EMAIL PROTECTED] Sent: Tuesday, January 16, 2007 1:56 PM To: sqlite-users@sqlite.org Subject: Re: [sqlite] DROP INDEX

<    2   3   4   5   6   7   8   9   10   11   >