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

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

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

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
. 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 be talking

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

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

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

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. > Many th

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

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

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

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
/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 Abayomi wrote: > So

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

Re: [sqlite] new sqlite-based webserver

2006-10-11 Thread John Stanton
; //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. c

Re: [sqlite] new sqlite-based webserver

2006-10-11 Thread John Stanton
tes (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. It uses W

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 traceroute

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

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

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: [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

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

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

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

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

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

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

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

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

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

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

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

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

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.

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

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] 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, 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

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),

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

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.

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

Re: [sqlite] SQLite with Index

2006-08-23 Thread John Stanton
Sqlite creates B-Tree indices. It is a form of self balancing tree index. Manzoor Ilahi Tamimy wrote: Dear All, I have question about Index. When we create an index on a table then how SQLite manage it. Whether SQLite uses Hashing or some other technique to handle index. Can some one

Re: [sqlite] implementing busy_handler callback

2006-08-23 Thread John Stanton
I would endorse that. It makes the logic simpler and execution more efficient compared with the various polling strategies used to look at file locks. It is particularly the case if you multi-use is due to threading in a single process. Ritesh Kapoor wrote: I think a good way of using

Re: [sqlite] Using Wrong Date Format

2006-08-18 Thread John Stanton
Sqlite has functions date() and strftime() which can do what you want. Eoin Collins wrote: Hi, The database I'm currently using has a field Date Of Birth, and all enteries in are in dd-mm- format. I need them in -mm-dd format. Can anyone help me with this, please? Regards, Eoin

Re: [sqlite] Re: fault tolerance

2006-08-17 Thread John Stanton
Your aim appears to be to have data recovery from hardware and operating system failures. That is beyond the power of Sqlite and needs to be designed into your system or the hardware. Logginjg or replication onto different media would provide the redundancy and diversity you seek. Olaf

Re: [sqlite] sqlite3_step() vs. get_tables() - CPU-Usage

2006-08-15 Thread John Stanton
A. Klitzing wrote: Hello, I need some information about the sqlite3_step() function. How much CPU-usage does it need in comparison with sqlite3_get_tables()? I have to implement functions like next(), prev(), last(), first(), relative(int) and absolute(int). #1 Way - sqlite3_step() I can

Re: [sqlite] starting with unicode

2006-08-15 Thread John Stanton
TRACE("Done ok\n"); break; case SQLITE_ERROR: TRACE("ERROR\n"); break; case SQLITE_MISUSE: TRACE("MISUSE\n"); break; default: break; } sqlite3_finalize(pStmt); Than

Re: [sqlite] starting with unicode

2006-08-15 Thread John Stanton
TRACE("Done ok\n"); break; case SQLITE_ERROR: TRACE("ERROR\n"); break; case SQLITE_MISUSE: TRACE("MISUSE\n"); break; default: break; } sqlite3_finalize(pStmt); Thanks,

Re: [sqlite] linking C program

2006-08-14 Thread John Stanton
Michael Alperovitch wrote: Hi, I am new SQLite user. How I can link the simple C Program with Sqlite static or shared library. I tried to link to libsqlite3.a and it cannot find sqlite3_open(), sqllite3_close(), sqllite3_exec() functions. I got the same result linking with libsqlite3.so

Re: [sqlite] starting with unicode

2006-08-14 Thread John Stanton
Mark Wyszomierski wrote: Hi Cory, Alright I gave it a shot from the docs but I'm not handling the prepare statement correctly. I'm trying the ASCI version first. The prepare statement returns an error. Here is the code snippet I'm trying: strSql.Format("CREATE TABLE test (something TEXT,

Re: [sqlite] concurent writes and locks

2006-08-10 Thread John Stanton
Why not make your application simple and use a mutex to synchronize your threads and serialize the database access? [EMAIL PROTECTED] wrote: I have two threads heavily writing to the db. Hence, I get some SQLITE_BUSY return values. If I get it from sqlite3_step(), I wait a few ms and call

Re: [sqlite] Multiple SELECTs (and single SELECT) and TRANSACTION ?

2006-08-09 Thread John Stanton
It depends upon your application. For it to function optimally you should make each transaction on your application an SQL transaction, commit it on success or rollback if there is a problem. In that way you make each transaction atomic and maintain the integrity of your database. Since

Re: [sqlite] Foreign Keys

2006-08-09 Thread John Stanton
Parsing is a language term. You might recall being taught to parse a sentence into subject and predicate, then phrases, verbs nouns, articles etc. A computer language parser does the same thing, lexical analysis to extract the words and syntactical analysis to match to the grammar. That

Re: [sqlite] Announce: SQL Maestro Group SQLite tools introduction

2006-08-09 Thread John Stanton
SQL Maestro Team wrote: Hi All, Two small notes first: 1. SQL Maestro Group is NOT linked with SQLight team, which messages you could read here last days. 2. It's our first announce and we promise to community to NOT send such messages too often - unfortunately, we don't release a new

Re: [sqlite] Problems opening db in win9x and utf8 filename

2006-08-08 Thread John Stanton
teExplorer and SQLiteSpy) both fail the above test (and for a good reason) Costas P.S. As I said, you can make an app work on both of these OSs, but with external manipulation. -Original Message----- From: John Stanton [mailto:[EMAIL PROTECTED] Sent: Tuesday, August 08, 2006 11:13 AM To: sq

Re: [sqlite] Problems opening db in win9x and utf8 filename

2006-08-08 Thread John Stanton
Our Sqlite applications work not only on Win98 and Win2000 but also on Linux, AIX and Solaris. Where did we go wrong? Costas Stergiou wrote: Hi all, I saw no more comments on this suggestion. It is very simple to program around this issue in user code, but I would like to see it fixed in the

Re: [sqlite] Insert delay!

2006-08-07 Thread John Stanton
Cesar David Rodas Maldonado wrote: Yeah John I am studying Math and computer science (but i am in the first year, and this is very boring) in National University Of Paraguay. When I finish my idea i will share my code. Thanks For understand my English John! On 8/5/06, John Stanton <[EM

Re: [sqlite] what tier architecture?

2006-08-07 Thread John Stanton
John Newby wrote: Hi, this is probably a stupid question and it has nothing to do with SQlite per se so I apologise in advance for hijacking the emails withmy question plus I don't even know if this is the right place to ask the question. I have created a GUI to SQLite using VB.Net for my

Re: [sqlite] Insert delay!

2006-08-05 Thread John Stanton
Cesar David Rodas Maldonado wrote: I was thinking a lot in the next month in how can I do the delay insert and I found something for do that, is basic because I don't have a lot of knowledge, I'm just start the University. OK, I need with SQLite to select all the time as possible, and delay the

Re: [sqlite] date data types

2006-08-05 Thread John Stanton
Will Leshner wrote: On 8/4/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: Adding DATE and TIMEINTERVAL types to SQLite would require an incompatible file format change. And it would go against the basic philosophy of SQLite. I wonder if it might not be useful to be able to ask SQLite if

Re: [sqlite] Return value of sqlite3_last_insert_rowid()?

2006-08-02 Thread John Stanton
Olaf Beckman Lapré wrote: What I'm not clear about is that the documentation says that rowid is an alias for the primary key column of type INTEGER PRIMARY KEY. How is the sqlite_int64 converted to a 'normal' C long? I'm using the sqlite3_last_insert_rowid() call to retrieve the key of the row

Re: [sqlite] IO Access Time

2006-08-01 Thread John Stanton
Christian Smith wrote: John Stanton uttered: In general you must expect Sqlite to use more of all resources compared to a flat file. After all Sqlite is a flat file with additional logic. Except updates and selective reads will be cheaper in general, as less IO is required due

Re: [sqlite] IO Access Time

2006-08-01 Thread John Stanton
Aseem Rastogi wrote: Hi All, I am planning to migrate to SQLite for my embedded system application. Currently we have a flat text file which we read and write using normal C++ routines. Whole of the configuration is written everytime some change happens. We do it using ofstream. For reading

Re: [sqlite] how to use the sqlite command-line specific commands with the dll version

2006-07-26 Thread John Stanton
John Newby wrote: Hi, I was wondering how I could use the commands specific to the command-line interface with the dll version. The commands I am wanting to use are as follows :- .dump .import .output .read Any help would be greatly appreciated Many thanks John These are part of the

Re: [sqlite] retrieving integers and long

2006-07-26 Thread John Stanton
Wyan wrote: I'm calling sqlite3_column_type() to get the type, and, for a number (20), it returns SQLITE_INTEGER. I'm guessing this covers int, long, and long long. Is there any way to distinguish which one it is, so I can know to call the right sqlite3_column_() function? I've got some

Re: [sqlite] Reading the same table from two threads

2006-07-26 Thread John Stanton
Jay Sprenkle wrote: On 7/26/06, John Stanton <[EMAIL PROTECTED]> wrote: > > Almost a "plug-in" serialization organization. I don't think I've ever > seen anyone do it that way, but that might be really valuable. > The embedded software guys would just love it.

Re: [sqlite] Reading the same table from two threads

2006-07-26 Thread John Stanton
Jay Sprenkle wrote: On 7/26/06, John Stanton <[EMAIL PROTECTED]> wrote: Jay Sprenkle wrote: >> > Will the mutex replace file locking for database access control? >> > >> >> No. A mutex only works within a single process. > > > I was thinking it mi

Re: [sqlite] Reading the same table from two threads

2006-07-26 Thread John Stanton
Jay Sprenkle wrote: > Will the mutex replace file locking for database access control? > No. A mutex only works within a single process. I was thinking it might make a good compile time option. If you aren't going to access the database from multiple machines then the mutex could replace

Re: [sqlite] Reading the same table from two threads

2006-07-26 Thread John Stanton
[EMAIL PROTECTED] wrote: "Rob Richardson" <[EMAIL PROTECTED]> wrote: I found the spot where I was telling the two threads to use the same database pointer instead of running on separate ones. Once I fixed that, it works. It has been suggested that I add a mutex to every SQLite database

Re: [sqlite] SQLiteSpy vs. SQLite.dll speed comparison

2006-07-26 Thread John Stanton
Eduardo wrote: At 01:38 26/07/2006, you wrote: Nuno Lucas wrote: On 7/22/06, Eduardo <[EMAIL PROTECTED]> wrote: Sorry, but i must disagree. He uses VC6, a compiler from you use a compiler from pre-altivec era or non altivec optimized libraries (including libc), your code will be a lot

Re: [sqlite] "SQL Error: near 'Table': Syntax error"

2006-07-26 Thread John Stanton
John Newby wrote: Hi, I've took the following quote from the SQLite website stating that "Tables names that begin with "*sqlite_*" are reserved for use by the engine" and if you try to create a table beginning with this it lets you know about it, but what about tables called "TABLE", this

Re: [sqlite] SQLiteSpy vs. SQLite.dll speed comparison

2006-07-25 Thread John Stanton
Nuno Lucas wrote: On 7/22/06, Eduardo <[EMAIL PROTECTED]> wrote: Sorry, but i must disagree. He uses VC6, a compiler from pre-alot-of-processor-advances. So, the compiler can't, not only compile for a more modern and different processor (different pipeline, sse, new processor modes, etc..) but

Re: [sqlite] Sqlite Write and read a the same time

2006-07-25 Thread John Stanton
If you want to use that POSIX record locking, use a flat file. Then you can lock a section of it. A DBMS like Sqlite is a web of linked records and shares the structures which maintain the links. Row and table locking requires other structures. Since Sqlite is a library, not a server, and

Re: [sqlite] locked implies exception?

2006-07-25 Thread John Stanton
Jay Sprenkle wrote: On 7/25/06, John Stanton <[EMAIL PROTECTED]> wrote: Martin Jenkins wrote: > John Stanton wrote: > >> I used to have one but I had to shoot it when it went feral. > > As a puppy? > No, not until instead of just chasing cars it started catching a

Re: [sqlite] locked implies exception?

2006-07-25 Thread John Stanton
Martin Jenkins wrote: John Stanton wrote: I used to have one but I had to shoot it when it went feral. As a puppy? mj No, not until instead of just chasing cars it started catching and eating them. Martin Jenkins wrote: Jay Sprenkle wrote: what's a CRUD? I wondered that too

Re: [sqlite] Getting callback with an INSERT

2006-07-24 Thread John Stanton
Olaf Beckman Lapré wrote: No, that's not the case since I'm using an AUTOINCREMENT key and I can't know the value of the key until the INSERT is completed. Olaf - Original Message - From: "John Stanton" <[EMAIL PROTECTED]> To: <sqlite-users@sqlite.org> Sent: M

Re: [sqlite] locked implies exception?

2006-07-24 Thread John Stanton
I used to have one but I had to shoot it when it went feral. Martin Jenkins wrote: Jay Sprenkle wrote: what's a CRUD? I wondered that too. http://en.wikipedia.org/wiki/CRUD_(acronym) Martin

Re: [sqlite] Getting callback with an INSERT

2006-07-24 Thread John Stanton
It hardly seems necessary to make it a callback since you could just call your function concurrently with the INSERT SQL. Olaf Beckman Lapré wrote: Is it possible to get a callback when doing an INSERT on a table similar to a SELECT callback? The callback would then contain the same parameters

Re: [sqlite] SQLiteSpy vs. SQLite.dll speed comparison

2006-07-21 Thread John Stanton
Michael, The guy who produced Sqlitespy is a member of this forum so he can confirm or debunk my theory as to why you are getting a big difference in execution time. I suspect that Sqlitespy might be storing the SQL in its compiled (from sqlite3_prepare) form and when you run it you skip

Re: [sqlite] A littel question...

2006-07-21 Thread John Stanton
Cesar David Rodas Maldonado wrote: I have not a substring, I have a list of words (stemmed words of several languages) and i just want to get the Id. The word is unique In that case the sqlite B-Tree index is about as good as you will get. just make sure that the word is an index.

Re: [sqlite] A littel question...

2006-07-21 Thread John Stanton
Cesar David Rodas Maldonado wrote: Hello to everybody If I have a table with 100.000 unique words I am wondering if SQLite select if faster an cheaper (RAM, Processor, etc), or If i have to help SQLite using a Hash function, and what could be that Hash function? Thanks. Do you want to

Re: [sqlite] SQLiteSpy vs. SQLite.dll speed comparison

2006-07-21 Thread John Stanton
It is possible to resolve the issue by using the traditional C profiler. Compile the SQL library with profiling on the different compilers and measure where the time is spent during execution. You can also compile some test programs and look at the assembler output to get an idea of the

Re: [sqlite] SQLite NFS Problem compared to Other Db's

2006-07-21 Thread John Stanton
Over NFS you are limited to the bandwidth of your network, probably 1-10 Mb/s. Compare that to the disk speed on your host server, one or two orders of magnitude better. The NFS link could be up to 50 times slower. If you want better distributed performance use a DBMS server like

Re: [sqlite] Importing Oracle 8.1.7 data into SQLite

2006-07-20 Thread John Stanton
Write it out in SQL and read in the SQL. A bit clumsy, but simple. Vinod Inamdar wrote: Dear All, I am a newbie to SQlite and I require the above mentioned functionality in the subject line for a specific project. Is it possible to import Oracle 8.1.7 data into SQLite. Also is it possible to

Re: [sqlite] sqlite

2006-07-20 Thread John Stanton
Sqlite is driven by SQL, so you just use SQL like any other SQL database. sandhya wrote: Hi, Is there any possibility to import files from the local file system to the sqlite DB.And Is there any export option is there just to check whether the loaded file and exported file consists of same

Re: [sqlite] Resources required and Lock & recovery mechanisms

2006-07-19 Thread John Stanton
Sqlite requires few resources. Locking is achieved through regular file locks which lock the entire database since it is a file. Flow control is not applicable. You may use semaphores etc in your application for synchronization, but they are not used by Sqlite. Maintenance of an Sqlite

Re: [sqlite] Compress function

2006-07-19 Thread John Stanton
Cesar David Rodas Maldonado wrote: I compile SQLITE 3 source into my APP, but i will like to use like mysql uses ( the COMPRESS() function into the sql), understand? I understand. Unfortunately I haven't implemented that.

Re: [sqlite] Compress function

2006-07-19 Thread John Stanton
Cesar David Rodas Maldonado wrote: I need a funcion from compress a row with Zlib and I am wondering if SQLite support or if someone did it and want to share him or her code. Thanks to all Do you want to have it as an Sqlite function or as a function in your application? In general you

Re: [sqlite] reg:sqlite usage

2006-07-19 Thread John Stanton
any files as Large objects inside DB and open it via a webserver instead of storing it in a local system and opening.In that case what i have to do.Like my DB whether i should place in the Webserver applcaition and access it or how can i do it? - Original Message - From: "John St

Re: [sqlite] reg:sqlite usage

2006-07-19 Thread John Stanton
Message - From: "John Stanton" <[EMAIL PROTECTED]> To: <sqlite-users@sqlite.org> Sent: Wednesday, July 19, 2006 5:53 PM Subject: Re: [sqlite] reg:sqlite usage Sandhya, You use Sqlite the same way you use a file in your application. You link in the runtime library contai

<    5   6   7   8   9   10   11   12   13   >