Re: [sqlite] Saving tables

2006-11-29 Thread John Stanton
Christian Smith wrote: John Stanton uttered: If you use an extension greater than 3 chars you violate rules for some existing file systems and reduce portability. You can also make it difficult to parse the extension when it is used to type the file. An extension of arbitray length

Re: [sqlite] Music Files

2006-11-28 Thread John Stanton
I cannot be much help since we never use VB or other similar proprietary software prisons. However I did see this set of notes from someone who was using Sqlite from VB and created a modified sqlite.h. http://www.persistentrealities.com/index.php?p=18 If you don't already have a lot of VB cod

Re: [sqlite] C++ SQLite

2006-11-28 Thread John Stanton
There us very little to learn, just equivalent names for types. RB Smissaert wrote: Yes, that looks to be the way to do it. Basically will have to learn how to translate C defines to VB declares. RBS -Original Message- From: John Stanton [mailto:[EMAIL PROTECTED] Sent: 28 November

Re: [sqlite] C++ SQLite

2006-11-28 Thread John Stanton
/programs (I like the API guide from KPD) that help you out. All I have to do is copy their declares straight to VB and look at the data types I have to provide. Is the same available for the SQLite API? RBS -Original Message- From: John Stanton [mailto:[EMAIL PROTECTED] Sent: 28 November

Re: [sqlite] C++ SQLite

2006-11-28 Thread John Stanton
If you can use the Win32 API you can use the Sqlite API. Just because they can be called from C programs does not make them "all to do with C". RB Smissaert wrote: Will have a look, but I was looking for a text geared towards VB. I take it the documentation that comes with SQLite is all to do

Re: [sqlite] Roll-back

2006-11-28 Thread John Stanton
ww.ch-werner.de/javasqlite/ and it looks like the only way I have to execute sql statements is to use the following commands: - Database.compile() - Database.exec() unfortunately no roll-back Benedetta Turchi Engineering Tools Engineering Tools Website John Stanton <[EMAIL PROTECTED]> 28

Re: [sqlite] Saving tables

2006-11-28 Thread John Stanton
Extensions are used by such systems as MIME to indicate file type. Fitting into those conventions is better than not doing so for some capricious reason. Name extensions are easier to handle than the traditional Unix "magic" method. Trevor Talbot wrote: On 11/28/06, John Stant

Re: [sqlite] Roll-back

2006-11-28 Thread John Stanton
Issue ROLLBACK instead of COMMIT for your transaction. If you have already issued COMMIT it is too late. [EMAIL PROTECTED] wrote: Hi, how can I 'roll-back' some modifications done by some previous sql statements with SQLite? Thank you Benedetta Turchi Engineering Tools Engineering Tools W

Re: [sqlite] Music Files

2006-11-28 Thread John Stanton
Here are a couple of links to get you started. I suggest you google your way until you find something which suits you. http://www.sqlite.org/cvstrac/wiki?p=SqliteWrappers http://www.freevbcode.com/ShowCode.asp?ID=6893 made hendra wrote: Thanks John, Btw, i'm not a sqlite advance nor vb. I'm n

Re: [sqlite] Saving tables

2006-11-28 Thread John Stanton
Sqlite is admirable in the way it uses broad standards and run on just about anything which can switch electrons. It is tidy practise and simply good business to maintain that most desirable condition. P Kishor wrote: On 11/28/06, John Stanton <[EMAIL PROTECTED]> wrote: If you

Re: [sqlite] C++ SQLite

2006-11-28 Thread John Stanton
Remember the first rule of IT. "If you don't have time do do it right, you don't have time to do it twice". sebcity wrote: Time constraints Craig Morrison-2 wrote: sebcity wrote: Thanks, Could you supply an example? I'm not going to be as nice as everyone else, go here: http://www.

Re: [sqlite] C++ SQLite

2006-11-28 Thread John Stanton
sebcity wrote: How would one go about using c++ (Visual Studio.NET) to call and display SQLite tables. C++ wrappers? You should be able to call the Sqlite3 API directly. - To unsubscribe, send email to [EMAIL PROTECTED]

Re: [sqlite] Music Files

2006-11-28 Thread John Stanton
made hendra wrote: Hello John, Tuesday, November 28, 2006, 4:08:58 AM, you wrote: sebcity wrote: Is it possible to store mp3 files in a SSQLite database? would they be able to be played from the database? How would you save them? Write them as a BLOB. Are there Sqlite ODBC that suppor

Re: [sqlite] vb sqlite

2006-11-28 Thread John Stanton
Sqlite is very widely used as an embedded SQL database. You probably use it already without knowing it. (Do you use Firefox?). Be warned that the price you pay for its simplicity is that it is not suitable for enterprise DBMS applications, like running Ebay, but is ideal for standalone applic

Re: [sqlite] Music Files

2006-11-28 Thread John Stanton
A BLOB is just a block of indeterminate, untyped data. You reference it by a pointer and a length and recover it the same way. Sqlite will store it as a linked list of pages. Think of it as a file, which is a pointer and a length, stored by the file system as a group or a group of groups of

Re: [sqlite] Saving tables

2006-11-28 Thread John Stanton
principle for IT design also. P Kishor wrote: I like using .sqlite as the extension (or .sqlite3). That way no Windows program will want to mess with it... usually 3 letter extensions are grist for the mill On 11/27/06, John Stanton <[EMAIL PROTECTED]> wrote: Use anything you like. Ver

Re: [sqlite] Saving tables

2006-11-27 Thread John Stanton
Use anything you like. Version 3 Sqlite is easy to recognize if you use .db3. RB Smissaert wrote: sqlite3 mydatabase.db3 I always use the extension .db What is the difference between db3 and db or maybe db2 etc.? RBS -Original Message- From: Kees Nuyt [mailto:[EMAIL PROTECTED] S

Re: [sqlite] Music Files

2006-11-27 Thread John Stanton
special ways a BLOB is handy, but it would not be a good way to store movies and similar. To store BVLOBs (Binary Very Large Objects) use files with a link to them in the Sqlite DB. Nicolas Williams wrote: On Mon, Nov 27, 2006 at 02:40:44PM -0600, John Stanton wrote: You store them in the

Re: [sqlite] Saving tables

2006-11-27 Thread John Stanton
If you are using Sqlite3 to access the DB you would -0 sqlite3 harry.db3 //Creates a database called harry.db3 enter some SQL to create a table and populate it exit To retrieve your data sqlite3 harry.db3//Opens DB harry.db3 enter some SQL e.g. SELECT * FROM

Re: [sqlite] Music Files

2006-11-27 Thread John Stanton
You store them in the DB as a BLOB type, but save the data as a JPEG, MP3, WAV or whatever it happens to be. The binary data resides as a DB column and the same row may have other columns which could be text to describe the item or a number to store the size etc. sebcity wrote: Ok,so just sa

Re: [sqlite] Music Files

2006-11-27 Thread John Stanton
sebcity wrote: Is it possible to store mp3 files in a SSQLite database? would they be able to be played from the database? How would you save them? Write them as a BLOB. - To unsubscribe, send email to [EMAIL PROTECTED]

Re: [sqlite] Design of application using embedded database

2006-11-19 Thread John Stanton
and also I suspect that the performance is not affected (apart from the fact that we have to store the journals somewhere). I am not sure about the size of the journals, and especially if they could be used at all after the transaction is committed. On 11/19/06, John Stanton <[EMAIL PROTECTED]&g

Re: [sqlite] Database sync

2006-11-19 Thread John Stanton
be able to use some sort of numeric convention, perhaps all odd values are local, all even ones remote, etc. Any thoughts on this? On 11/19/06, John Stanton <[EMAIL PROTECTED]> wrote: Isaac Raway wrote: > I am looking at a design that will require syncing a disconnected SQLite DB

Re: [sqlite] Design of application using embedded database

2006-11-19 Thread John Stanton
Ran wrote: I think I didn't explain my question well enough. I know all what you wrote about transactions. The undo functionality I am looking for is over _several_ transactions. I just wonder if it is possible to twist sqlite to keep the journals created during transactions (so to store them

Re: [sqlite] Syntax Error

2006-11-19 Thread John Stanton
Clara Kinner wrote: Ah yes! I tried a dos prompt last night, but it wouldn't work... didn't like the directory or something odd. I moved the sqlite3 program to the C:\ dir and it worked.But now I have no idea where it created the test.db! Haha... Thank you for your help! Clara Trevor Talbo

Re: [sqlite] Database sync

2006-11-19 Thread John Stanton
Isaac Raway wrote: I am looking at a design that will require syncing a disconnected SQLite DB file on client's machines to a central server. The version of the DB on the server will also be modified periodically, so there is a chance that new records will be created in either and also updated. C

Re: [sqlite] select from commandprompt with output to file

2006-11-17 Thread John Stanton
RB Smissaert wrote: Have tried this now and working beautifully. One thing I couldn't figure out is how to set the row delimiter. I can set the column delimiter fine with .mode csv, but couldn't see something similar for the rows. The delimiter for rows should be vbCrLf. As SQLite is written in

Re: [sqlite] Date and time comparison

2006-11-17 Thread John Stanton
Karthick V - TLS , Chennai wrote: Hello everyone, I am trying to retrieve some records from the database using date and time comparison. The table has three columns, Row Id, Start Time and end Time. I need to get the row id for a time which falls within the start and end time. I am using

Re: [sqlite] Handling null characters in blob data

2006-11-15 Thread John Stanton
Vivien Malerba wrote: On 11/13/06, Shivshankar Subramani - TLS , Chennai <[EMAIL PROTECTED]> wrote: Hi all, > SQLite version 2.8 and earlier could not (easily) store binary > data - data with embedded \000 characters. Thus the encode/decode > routines were provide to transform data so that i

Re: [sqlite] Database Locked

2006-11-14 Thread John Stanton
You have to find what is locking the database and unlock it. Lloyd wrote: I have tracked down the problem and found th following. I have a select statement which stores the result set in a pointer variable. If the result set of select statement is empty, the program executes, otherwise it gives

Re: [sqlite] Re: Re: Handling null characters in blob data

2006-11-14 Thread John Stanton
You are making an error in the way you handle the compressed data in your program and pass it to the Sqlite API. Read up on the Sqlite API and it will be clear. Basically if you are handling a buffer of binary data you identify it by a descriptor of some sort, a pointer and a length. If you

Re: [sqlite] (New SQLite user) - ANSI Datatypes

2006-11-14 Thread John Stanton
Look at the sqlite docimentation and read all about "manifest typing". That will explain why VARCHAR and CHAR don't exist as distinct types, and why. Note that Sqlite stores the VARCHAR as the declared type, but makes it own decision as to the storage type. If VARCHAR is important to your ap

Re: [sqlite] Is it bad to...

2006-11-11 Thread John Stanton
David Gewirtz wrote: John Stanton wrote: I don't understand how you apply Frontier. To build a multi-threaded web server hosting Sqlite looks like a project to replace Frontier, which already has embedded Sqlite. Ah, ok, let's back up. I and some other developers finished add

Re: [sqlite] Is it bad to...

2006-11-10 Thread John Stanton
David Gewirtz wrote: John Stanton wrote: What language are you using? Certain language environments would make implementing the server clumsy. I'm using an environment called the Frontier Kernel (http://www.frontierkernel.org), which is the open source version of the original Use

Re: [sqlite] Is it bad to...

2006-11-10 Thread John Stanton
The traditional CGI approach is to open and close the database for each transaction. If you build your own threaded server to avoid that it does not make sense to continue the open and close situation. Opening and closing the DB is not an enormous overhead, but is ugly if your clients are usi

Re: [sqlite] Stored procedures

2006-11-09 Thread John Stanton
Sqlite supports user loaded functions and triggers but not stored procedures. You can probably achieve the functionality you need with functions and/or triggers. VIGNY Cecilia wrote: Hi, Does SQLite supports stored procedures ? If it does, what is the appropriated syntax ? Thanks. Ce m

Re: [sqlite] Date and time

2006-11-08 Thread John Stanton
Your machine has the timezone recorded and localtime uses that to make the appropriate correction from UTC (Greenwich or Zulu) time. This approach makes the time correct if you are operating across time zones. It is the way your Unixepoch time expects to work. A machine which gives the corre

Re: [sqlite] weird (and dangerous) bug in Microsoft Compiler

2006-11-08 Thread John Stanton
What would you expect 9.95 to round to? Here are the simple rounding rules - Rule 1- if the remainder beyond the last digit to be reported is less than 5, drop the last digit. Rounding to one decimal place, the number 5.3467 becomes 5.3. Rule 2-if the remainder is greater than 5, increase t

Re: [sqlite] Question on Sqlite DB

2006-11-07 Thread John Stanton
Yes [EMAIL PROTECTED] wrote: Hi, can SQLite receive as input a file containing SQL instructions? Thank you Benedetta Turchi Engineering Tools Engineering Tools Website - *** ***

Re: [sqlite] Q about new SQLite API

2006-11-07 Thread John Stanton
[EMAIL PROTECTED] wrote: I'm working on a new API routine for SQLite and I have questions for the community. The working name of the new api is sqlite3_prepare_v2(). sqlite3_prepare_v2() works like sqlite3_prepare() in that it generates a prepared statement in an sqlite3_stmt structure. The dif

Re: [sqlite] Another question on single-thread intent

2006-11-03 Thread John Stanton
David Gewirtz wrote: John Stanton wrote: Perhaps a thread per open database sync'd on an event and driven by a queue would give you contention-free operation and avoid the need to ever have the DB locked. A thread would post its request to the queue then wait on an event signi

Re: [sqlite] sqlite backup from the program.

2006-11-03 Thread John Stanton
As was pointed out, an Sqlite DB is just va file. Copy it to make a backup. If you cannot create a file from your O/S then you will never be able to make a backup. Fix that problem first. [EMAIL PROTECTED] wrote: No, We are working on RTOS. There is some problem with mounting the fi

Re: [sqlite] Another question on single-thread intent

2006-11-02 Thread John Stanton
David Gewirtz wrote: I know the restriction of passing open databases across threads. What I'm wondering is whether that's really a process/thread issue, or a concern over making sure two or more threads don't muck with a single database at the same time. Basically, I'm exploring how I might imp

Re: [sqlite] SQLite and McAfee Anti-Virus

2006-10-31 Thread John Stanton
Why not make it McAfee and direct the complaints to the culprits? Joe Wilson wrote: Even better - name the temp file prefix msaccess_ and no one will dare touch it or question it. - Original Message From: James Berry <[EMAIL PROTECTED]> To: sqlite-users@sqlite.org Sent: Tuesday, Octob

Re: [sqlite] SQLite and McAfee Anti-Virus

2006-10-31 Thread John Stanton
[EMAIL PROTECTED] wrote: [EMAIL PROTECTED] wrote: On Tue, 31 Oct 2006 [EMAIL PROTECTED] wrote: http://www.sqlite.org/cvstrac/tktview?tn=2049 Does anybody have an suggestions on how I might deal with this? Does anybody know how I can get in touch with an engineer at Mcafee so that we can at

Re: [sqlite] SQLite and McAfee Anti-Virus

2006-10-31 Thread John Stanton
[EMAIL PROTECTED] wrote: On Tue, 31 Oct 2006 [EMAIL PROTECTED] wrote: I need advice from the community. The problem is seen here: http://www.sqlite.org/cvstrac/tktview?tn=2049 http://www.sqlite.org/cvstrac/tktview?tn=1989 http://www.sqlite.org/cvstrac/tktview?tn=1841 http://www.sqlite.org

Re: [sqlite] know a field datatype on callback function

2006-10-31 Thread John Stanton
Rúben Lício wrote: Hi, Can I know how is the field datatype on callback function? If not, can i know in other way?? ty, Ruben If you use sqlite3_prepare and sqlite3_step you can call the API functions which give you the decalred and actual type.

Re: [sqlite] Memory Usage

2006-10-30 Thread John Stanton
What happens when you write a simple test program to open the DB? You can certainly run Valgrind on that or even put in your own debug statements to examine the heap usage. This would be the first thing to do in indentifying the problem. It will tell you whether to look at Sqlite or your app

Re: [sqlite] Using SQLite in threadly Web server applications

2006-10-30 Thread John Stanton
At some point shared usage of a single resource involves some form of synchronization. If you use Sqlite the you need to add that capability somehow. Sqlite lets you use file locks fairly simply for that purpose if that suits your application. An alternative is to use something like PostgreS

Re: [sqlite] Using SQLite to record Web log file data (a threading question)

2006-10-29 Thread John Stanton
[EMAIL PROTECTED] wrote: "David Gewirtz" <[EMAIL PROTECTED]> wrote: I've been exploring SQLite for a number of applications, but one I'd like to embark on soon is using SQLite to record Web site log file data, so I can perform SQL-based analysis on my logs, rather than using some thing like Ana

Re: [sqlite] Re: Regarding sqlite3_exec

2006-10-25 Thread John Stanton
Nuno Lucas wrote: On 10/25/06, Dennis Cote <[EMAIL PROTECTED]> wrote: Nuno Lucas wrote: > > There is another alternative if you don't mind to have the overhead of > having an automatic row count (which sqlite avoids by design). It's by > having a trigger that will update the table row count on

Re: [sqlite] Re: Regarding sqlite3_exec

2006-10-25 Thread John Stanton
There is no magic in data retrieval. Google use the same physical laws as us ordinary mortals. I see no reason to ever perform a dataabase search twice. Da Martian wrote: Yes but google doesnt us an RDMS, its all propriatary to support there speed and huge volumes. Its anyones guess (excpet

Re: [sqlite] blob vs. string in bound parameters

2006-10-23 Thread John Stanton
umber. Sqlite's "manifest typing" has been carefully thought through and is almost all things for all people. Andy Ross wrote: John Stanton wrote: > The method I wrote about earlier is part of a language binding. > I can show you the code if you are interested. I think we must

Re: [sqlite] blob vs. string in bound parameters

2006-10-23 Thread John Stanton
The method I wrote about earlier is part of a language binding. I can show you the code if you are interested. Andy Ross wrote: Dennis Cote wrote: > The following log shows that sqlite does indeed distinguish > between a text field and a blob with the same content. It also > shows you a work

Re: [sqlite] blob vs. string in bound parameters

2006-10-23 Thread John Stanton
Sqlite has declared types and actual types. Both can be accessed through the API. What I do is look at the declared type, which defines the data and then look at the actual type to determine how to process it. Youn can declare the type to be anything you want. A name such a GEORGE or INVOI

Re: [sqlite] Re: bind with select?

2006-10-23 Thread John Stanton
Use sqlite3_step. Dave Dyer wrote: You don't appear to be using BIND in the manner I was hoping for. You're using BIND to replace variables in the query. I want to use BIND (or something like it) eliminate the need for callback functions to consume the results of a select. -- At 05:42 PM 1

Re: [sqlite] any data access and retrieval engine?

2006-10-23 Thread John Stanton
Sarah, email me off forum at [EMAIL PROTECTED] BTW, all my programs are ANSI standard plain vanilla C. Regards, John S Sarah wrote: > Hi, John Stanton > > I really really appreciate your warm help. > That's great if you can send me the codes of B tree and B+ tree. > Ma

Re: [sqlite] SQLite Performance Issues

2006-10-23 Thread John Stanton
I built and use an application server which embeds Sqlite and processes web traffic. It is multi-threaded and can handle very many connections. It is very fast because it uses no IPC channels or process creation. It caches threads and reuses them rather than creating and killing them. It can

Re: [sqlite] any data access and retrieval engine?

2006-10-22 Thread John Stanton
Clay Dowling wrote: > Sarah wrote: > >>Hi,all >> >>First of all, I want to thank all the guys on this mailing list for their >>warm help. >> >>After 1 more month of work, I finally make SQLite work on my embedded >>environment. SQLite is really great! Many thanks,Drh. >> >>But, due to the extrem

Re: [sqlite] sqlite-locked error

2006-10-19 Thread John Stanton
Does a virus checker have the file open? Dave Dyer wrote: I've got a database that is permanantly locked, presumably due to some error. Any attempt to modify it results in a "sqlite_locked" error. This error persists even if all users close the database. sqlite> insert into user (nam

Re: [sqlite] problem with sqlite3 in lazarus

2006-10-19 Thread John Stanton
Sqlite does not use VARCHAR(n) or NUMERIC(s,p). Read up about manifest typing in the documentation and just declare columns as underlying types such as TEXT. You can declare the column as anything you like, but Sqlite makes its own decision as to what it will be. Carlos Avogaro wrote: Hi,

Re: [sqlite] Question - Multiple Users, Multiple files

2006-10-14 Thread John Stanton
or postgre/sql and didn't think it better to have instead a database with thousands of tables, each created per user with some of the users having more than one table by the way. I'm always open for more suggestions. On 10/13/06, John Stanton <[EMAIL PROTECTED]> wrote: Jason Ab

Re: [sqlite] Question - Multiple Users, Multiple files

2006-10-13 Thread John Stanton
Jason Abayomi wrote: Sorry about the previous mail, I hit tab in a gmail and it automatically sent it. Anyway, back to my question I'm planning out a program right now - web based - that would require each user of the application to be able to create their own independent data store with its own

Re: [sqlite] new sqlite-based webserver

2006-10-11 Thread John Stanton
uot;); //db.exec("delete from user where id="+id); if you are still curious (or anyone else ?), i can send you the actual source by mail. :-) btw: i had a look into your http-source: looks nice, but its maybe to complicated to implement my features like http-multipart-posts

Re: [sqlite] new sqlite-based webserver

2006-10-11 Thread John Stanton
minutes (see "http://greschenz.dyndns.org/logsByTime.html";) !!! thats really unacceptable ! could you mail me some samples howto multithread portable (linux & win32) ? cu, gg John Stanton schrieb: Gunter, I recently wrote a multi-threaded portable web server in simpl ANSI C.

Re: [sqlite] new sqlite-based webserver

2006-10-10 Thread John Stanton
Martin Jenkins wrote: John Stanton wrote: Martin Jenkins wrote: Seems ok now. Quite fast even. It is still dead. Address 62.194.135.186 doesn't respond. Traceroute fails. Odd. It's still working here (UK). DNSStuff reports a different address though (62.104.138.84) and a

Re: [sqlite] new sqlite-based webserver

2006-10-10 Thread John Stanton
Gunter, I recently wrote a multi-threaded portable web server in simpl ANSI C. It uses Win32 threads or pthreads. It caches threads and re-uses them on a most recently used basis. Efficiency is obtained by using TransmitFile (Win32) or sendfile (Unix). The logic is simple for an efficient,

Re: [sqlite] new sqlite-based webserver

2006-10-09 Thread John Stanton
Martin Jenkins wrote: Fred Williams wrote: What'ch got it running on, a 286? Tried three different times and got tired waiting all three times :-( Seems ok now. Quite fast even. mj - To unsubscribe, send email

Re: [sqlite] Re: SQLite Order BY

2006-10-09 Thread John Stanton
A. Pagaltzis wrote: * John Stanton <[EMAIL PROTECTED]> [2006-10-09 19:35]: Sorting data is time consuming, a physical law is involved. At best it is an nlog(n) process. Only when you sort by comparing elements with each other. Bucket sort runs in O(n), f.ex. And quantum sort

Re: [sqlite] new sqlite-based webserver

2006-10-09 Thread John Stanton
Gunter, I cannot access your web site. The address is resolved, then the server hangs. It would be interesting to look at your www server. Günter Greschenz wrote: hi, i dont know if anyone is interested in my new open source project... i implemented a little webserver with javascript as bac

Re: [sqlite] SQLite Order BY

2006-10-09 Thread John Stanton
Sorting data is time consuming, a physical law is involved. At best it is an nlog(n) process. Sorting a result set or sorting the keys to build an index invokes the nlog(n) timing. If you cannot tolerate time spent sorting, you need to redesign your database to avoid sorts, or to maintain re

Re: [sqlite] Can anyone recommend some ISAM db to me?

2006-10-08 Thread John Stanton
All the involvement of SQL makes no sense in a simple embedded application which is performing associative lookups or ISAM type access. Look at perhaps using DBM or its derivative or something like C-Tree or another B-Tree method. In mimimal applications we have used AVL trees with success. The

Re: [sqlite] Optimize performance - reading from multiple databas e files, processing and writing to separate results database file?

2006-10-04 Thread John Stanton
Make several large DBs as your input in that case and do - select from DB1 select from DB2 ... select from DBn insert into output Serena Lien wrote: No, I am not copying anything to an in-memory database, this was just an alternative option I was suggesting, so please ignore the whol

Re: [sqlite] Optimize performance - reading from multiple databas e files, processing and writing to separate results database file?

2006-10-04 Thread John Stanton
Serena Lien wrote: Thanks for the response. -- 1 Gbyte is not at all too big for Sqlite to handle in one file. True, but I think too big for an in-memory database - I was considering copying all my source data from separate databases into one table in an in-memory database so that I could acce

Re: AW: [sqlite] Memory mapped db

2006-09-28 Thread John Stanton
Trevor Talbot wrote: Michael is referring to a direct map from disk pages to memory pages (OS notion of pages, not sqlite's), using something like mmap() on unix or MapViewOfFile() on Windows. This way memory is directly backed by the file it refers to, instead of copying the data to entirely ne

Re: [sqlite] Memory mapped db

2006-09-28 Thread John Stanton
Michael Wohlwend wrote: Has anyone tested an sqlite which memory-maps the db-file into ram? Is this an old (maybe bad idea :-) ? I've looked over the source and it seems that read and write operations are used through a singled interface, so it maybe possible to implement it without too much tro

Re: [sqlite] Re: The term "flat-file" as applied to sqlite

2006-09-26 Thread John Stanton
A. Pagaltzis wrote: * Griggs, Donald <[EMAIL PROTECTED]> [2006-09-25 22:10]: 2) If instead, I'm unaware of another popular use of the term "flat file" -- then I'd be glad to learn this. I think there's another explanation for how this term came about. Dr. Hipp has asserted many timed that SQ

Re: [sqlite] Please help me locking/transaction? logic !

2006-09-25 Thread John Stanton
when the SELECT statement is run. I think this is a bug (since the doc says it should) so I have added a ticket. There is a workaround though but since SQLite does not support nested transactions it might be hard to use. /Martin >From: John Stanton <[EMAIL PROTECTED]> >Subject: Re:

Re: [sqlite] Please help me locking/transaction? logic !

2006-09-25 Thread John Stanton
"serialization" or "single >streaming" in some way. >From: John Stanton <[EMAIL PROTECTED]> >Subject: Re: Please help me locking/transaction? logic ! >Newsgroups: gmane.comp.db.sqlite.general >Date: 2006-09-25 19:52:57 GMT (14 minutes ago)

Re: [sqlite] The term "flat-file" as applied to sqlite

2006-09-25 Thread John Stanton
Griggs, Donald wrote: I've noticed that more than one contributor to this list has referred to sqlite as a "flat file database." I had always thought of a flat file as a file composed of single table of records, with records defined either by fixed-width allocations or by some sort of delimite

Re: [sqlite] Please help me locking/transaction? logic !

2006-09-25 Thread John Stanton
Martin Alfredsson wrote: Is this correct ? My program calls: sqlite3_prepare(...) sqlite3_step(...) Here another process writes to the database sqlite3_exec(...) sqlite3_finalize(...) Now my program will fail with SQLITE_BUSY (5) when accessing the database. If I dont terminate the other pro

Re: [sqlite] Using SQLite on networked drive

2006-09-25 Thread John Stanton
RohitPatel wrote: I have read articles and understood that it is not safe to access SQLite database file on network drive. (on all windows). But what about Windows 2000 (Server) ??? i.e. If SQLite (3.3.4 or 3.3.6) database file resides on disk drive of Windows 2000 Server, then is it safe

Re: [sqlite] how sqlite works?

2006-09-20 Thread John Stanton
I suggest that you get Donald Knuth's books (Fundamental Algorithms, Sorting and Seaching and Semi-Numerical Algorithms). They have everything you need to know, and plenty more. Knuth explains various type of B-Tree and plenty of merging algorithms. Cesar David Rodas Maldonado wrote: I meen

Re: [sqlite] Re: SQLite vs MS Access

2006-09-07 Thread John Stanton
George Ionescu wrote: Helo Allan, This would be used in place of an MS Access database on a local/network disk. I believe that SQLite should be quicker for both transactions and queries than Access. The one draw back that comes to mind maybe portability (i.e. accessing data outside of t

Re: [sqlite] SQLite vs MS Access

2006-09-06 Thread John Stanton
Sqlite is far more portable than Access. There is also an ODBC interface available so that you can use the standard SQL/CLI API. Just be wary of the fact that Sqlite does not have a server like PostgreSQL so you may run into some locking situations if you have your database distributed across

Re: [sqlite] Database on usbstick

2006-09-06 Thread John Stanton
eWobbuh wrote: For a database that is write once, read mostly, you probably wouldn't have a lot of trouble, If I were doing it, I'd try to have most of the sorting and other manipulations done in regular RAM or on the hard drive to minimize repeated changes on the stick itself. The idea

Re: [sqlite] Tool to find out the memory usage of a program

2006-09-06 Thread John Stanton
Anish Enos Mathew wrote: Thanks for the reply. Earlier i tried using top and ps. But i dropped it when i came to know that top and ps doent give the accurate memory usage. So I tried with valgring, memcheck etc. But that too didn't give me the desired result. The result of valgrind was m

Re: [sqlite] Stripping a newline character

2006-09-05 Thread John Stanton
What language are you using? Rob Richardson wrote: Greetings! I am using a serial communications package that includes a readline() method to talk to a bar-code scanner. Readline() gives me a string whose last character is a newline ('\n'). I am trying to get rid of the newline. MyStrin

Re: [sqlite] Database on usbstick

2006-09-05 Thread John Stanton
eWobbuh wrote: Ok thanks. Ill figure it out then. Do you have any idea of it is possible for a small database to be on a usb stick? Or is this is gonna be horrible slow? It will not be stunningly fast, but if you use transactions wisely you will probably find that it can run well. Sqlite is ju

Re: [sqlite] Database on usbstick

2006-09-05 Thread John Stanton
eWobbuh wrote: I still cant find it. Cant find anything about where to look for a database. Only thing i cant find is the open function, but there you only give the name of the database. plz help this n00b You have it. The sqlite3_open is how how access the database. Use its pathname. --

Re: [sqlite] Database on usbstick

2006-09-05 Thread John Stanton
eWobbuh wrote: Havent try it yet, just wondering if its possible. Do you know how you tell sqlite where to find a database? havent worked before with it.. only with mysql Just use the pathname of the single file which contains the entire Sqlite DB. -

Re: [sqlite] Best way to compare two databases

2006-09-05 Thread John Stanton
You could use brute force and ignorance. Keep a master copy of your database in SQL form and do a diff on the SQL form of the new DB, then export the changes as SQL to update the remote DBs. You may have deletions and update and would need to take them into account when you are doing the diff

Re: [sqlite] pre-compiling prepared statements

2006-09-01 Thread John Stanton
chetana bhargav wrote: It does make a difference with embedded deivces, where both speed and memory constraints matter a lot. -Chetan. Jay Sprenkle <[EMAIL PROTECTED]> wrote: On 9/1/06, John Stanton wrote: I believe that Dr Hipp has available a special version of Sqlite

Re: [sqlite] pre-compiling prepared statements

2006-09-01 Thread John Stanton
Jay Sprenkle wrote: On 9/1/06, John Stanton <[EMAIL PROTECTED]> wrote: I believe that Dr Hipp has available a special version of Sqlite which stores prepared statements. It has restrictions which may make it unsuitable for general purpose applications, but could be the answer this u

Re: [sqlite] pre-compiling prepared statements

2006-09-01 Thread John Stanton
Jay Sprenkle wrote: On 9/1/06, chetana bhargav <[EMAIL PROTECTED]> wrote: Hi, Is there any way to pre compile some of the prepared statements during compile time. I am having 4 tables of which two tables doesn't create any triggers/joins. I am basically trying to speed up the queries on t

Re: [sqlite] count(gid) takes too long

2006-08-29 Thread John Stanton
Sripathi Raj wrote: Hi, I have a table with 500,000 records. The following is the schema of that table: CREATE TABLE ES_SRC_MEDIA_INFO (GID INTEGER PRIMARY KEY AUTOINCREMENT, MEDIAPATH VARCHAR(256) NOT NULL UNIQUE, BYTES_USED LONG, BYTES_ON_DISK LONG, MTIME LONG, CTIME LONG, TYPE VARCHAR(20), C

Re: [sqlite] sqlite shared-cache mode usage

2006-08-29 Thread John Stanton
Jay Sprenkle wrote: On 8/29/06, John Stanton <[EMAIL PROTECTED]> wrote: Thankyou. The Firefox people have merely removed their dependance upon an unreliable resource, cross OS file locking. A prudent design choice. If they come up with an elegant distributed lock protocol it would be

Re: [sqlite] sqlite shared-cache mode usage

2006-08-29 Thread John Stanton
Thankyou. The Firefox people have merely removed their dependance upon an unreliable resource, cross OS file locking. A prudent design choice. If they come up with an elegant distributed lock protocol it would be worth propagating universally in the light of the success of Firefox and its co

Re: [sqlite] sqlite shared-cache mode usage

2006-08-28 Thread John Stanton
Jay Sprenkle wrote: The problem is that they have to work on broken operating systems. I don't know of another way to patch around the problem. Do you? nope. If it breaks because of something you did, then YOU are the bum. If it's broken because of the operating system THEY are the bums. H

Re: [sqlite] List of web hosting providers who provide/support SQLite?

2006-08-26 Thread John Stanton
If they offer PHP then they offer Sqlite, since it is embedded. Clark Christensen wrote: I've been thinking about that myself. Then I started to wonder if the more common MySQL or PostgreSQL wouldn't be just as good (or better) for websites - particularly remote-hosted ones. I see there are

<    5   6   7   8   9   10   11   12   13   14   >