Re: [sqlite] iPhone

2007-07-02 Thread Will Leshner
On 7/2/07, RaghavendraK 70574 <[EMAIL PROTECTED]> wrote: Congratulations to DRH and all. I Just love this beast,incredibly small but with monster features. Of course, SQLite is already a big part of Mac OS X. It is the "core" of Core Data:

Re: [sqlite] Re: Dropping updates after exiting application

2007-06-04 Thread Will Leshner
On 6/4/07, Igor Tandetnik <[EMAIL PROTECTED]> wrote: One step is always enough for INSERT, UPDATE and DELETE as they don't produce a resultset. Only SELECT requires multiple steps, one for each row. I thought that might be the case. Thanks.

Re: [sqlite] Dropping updates after exiting application

2007-06-04 Thread Will Leshner
On 6/4/07, Omar Eljumaily <[EMAIL PROTECTED]> wrote: qlite3_prepare_v2(con->_db, text.c_str(), text.size(), &_stmt, ); sqlite3_bind_text(_stmt, which, s.c_str(), s.size(), SQLITE_TRANSIENT); sqlite3_step(_stmt); Is one step enough to finish the operation?

Re: [sqlite] Concurrency

2007-06-01 Thread Will Leshner
On 6/1/07, Eduardo Morras <[EMAIL PROTECTED]> wrote: If i remember well, sqlite uses two databases for metadata/schema Databases or tables? Could you be thinking of the sqlite_master table? - To unsubscribe, send

Re: [sqlite] building/upgrading on Mac OS X

2007-05-24 Thread Will Leshner
On 5/23/07, Alessandro de Manzano <[EMAIL PROTECTED]> wrote: That's my question too, and I'm glad to hear it works fine for you :) (may I ask you which version of OS X are you using ? the latest 10.4.9 ?) Yes. I'm building on a MacBook Pro running 10.4.9. I don't understand why on the

Re: [sqlite] building/upgrading on Mac OS X

2007-05-23 Thread Will Leshner
On 5/23/07, Alessandro de Manzano <[EMAIL PROTECTED]> wrote: May I ask exactly why the wiki instruct to NOT build shared lib ? The reference of a bad libtool still applies to recent OS X releases ? Why don't you just do configure and make? That's what I always do and it works fine for me. You

Re: [sqlite] Backing up a SQlite database

2007-02-09 Thread Will Leshner
On 2/9/07, Rich Shepard <[EMAIL PROTECTED]> wrote: On Fri, 9 Feb 2007, Mikey C wrote: > This might be a dumb question, but is taking a backup of a live database > simply a matter of copying the file to a backup device/drive? Yes. It's a regular file to your OS. As a matter of fact, you can

Re: [sqlite] does select reliably return insert order?

2007-01-19 Thread Will Leshner
On 1/19/07, Kevin Dangoor <[EMAIL PROTECTED]> wrote: What I'm wondering about is whether I should put an integer primary key on the data table to ensure that the ordering is correct, or if "SELECT * FROM LIMIT OFFSET " will reliably return data in the same order in which is was inserted. It

Re: [sqlite] Is there a way to turn off -journal files?

2007-01-15 Thread Will Leshner
On 1/15/07, Dave Gierok <[EMAIL PROTECTED]> wrote: I'm building the Sqlite lib using the preprocessor definition TEMP_STORE=3, but I still notice that temporary '-journal' files are being created/deleted when running queries that will modify the DB. I thought that the TEMP_STORE=3 was

Re: [sqlite] strange %W behavior

2007-01-07 Thread Will Leshner
On 1/7/07, Joe Wilson <[EMAIL PROTECTED]> wrote: This problem appears to be pretty old: Interesting. I went ahead and filed a bug report. Thanks. - To unsubscribe, send email to [EMAIL PROTECTED]

[sqlite] strange %W behavior

2007-01-07 Thread Will Leshner
In the current release of SQLite (3.3.9) I find that if I execute the following query multiple times in succession I get different values for %W: SELECT strftime('%Y-%W', 'now'); Sometimes the value is '2007-02' and other times the value is '2007-01'. If this sounds like a bug, I'll file a bug

Re: [sqlite] multiple order by value bug?

2006-12-12 Thread Will Leshner
On 12/12/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: No, I accomodate only te kereset.datum colum to the ORDER BY clause, and then the result come wrong. Ah. Ok. Sorry for the confusion. - To unsubscribe, send

Re: [sqlite] multiple order by value bug?

2006-12-12 Thread Will Leshner
On 12/12/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: This query works fine (I think my collate function too), but if I accomodate it with "ORDER BY szemely.nev,szemely.anyanev,kereset.datum", then sorting is in wrong order. Do you mean you have two "ORDER BY" clauses? Seems like that

Re: [sqlite] Determining Data Types

2006-12-08 Thread Will Leshner
On 12/8/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: This gets into my ignorance of how sqlite works internally, but if I quote an "integer" value, it will still be stored correctly? I have no problems doing that, I just wasn't sure if that was the case. Also, how do I need to send date

Re: [sqlite] Determining Data Types

2006-12-08 Thread Will Leshner
On 12/8/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: I can construct the update statement without much issue, but I need to know whether or not I should put quotes around value, so I need to know whether or not field3 is a text type field. Why not just quote all the values?

Re: [sqlite] OT: filenaming conventions -- was: Re: [sqlite] Saving tables

2006-11-28 Thread Will Leshner
On 11/28/06, P Kishor <[EMAIL PROTECTED]> wrote: Whether or not this is true, the fact is, in Windows (and even in Mac OS X, while using the Finder), three letter extensions mean something special. By making it '.sqlite' (or '.bobbitybob', for that matter), I hope to make my db immune from all

Re: [sqlite] using auto increment in java

2006-11-11 Thread Will Leshner
On 11/11/06, Patrick Marchwiak <[EMAIL PROTECTED]> wrote: I am working on a Java program that uses SQLite for its database. I am using auto increment on some of my inserts and am wondering if there is some easy way to retrieve the auto incremented rowid right after inserting. I realize that

Re: [sqlite] Re: Q about new SQLite API

2006-11-07 Thread Will Leshner
On 11/7/06, Igor Tandetnik <[EMAIL PROTECTED]> wrote: In general, there is no rowid associated with a row returned by select. A row may be constructed out of data taken from multiple rows of multiple tables, or be manufactured without reference to any table at all. If you want a rowid from a

Re: [sqlite] sqlite backup from the program.

2006-11-03 Thread Will Leshner
On 11/3/06, John Stanton <[EMAIL PROTECTED]> wrote: 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. There is, however, one issue to be aware of. If you

Re: Re: [sqlite] feature enhancement: extending rowid

2006-10-21 Thread Will Leshner
On 10/19/06, Jay Sprenkle <[EMAIL PROTECTED]> wrote: The offset of the row within the result set (0,1,2,3 etc). You can get it programmatically but it your're trying to do something complicated all in SQL you don't have that option. Aha. Ok. I see what you are after. Yeah, I think there might

Re: [sqlite] feature enhancement: extending rowid

2006-10-14 Thread Will Leshner
On 10/13/06, Jay Sprenkle <[EMAIL PROTECTED]> wrote: Having a builtin function that returns the row number of the row in the result set would be useful for some of the things I'm doing. Rowid is close, but not won't work in my application. What would the "row number" represent?

Re: Re: [sqlite] wxSqlite- Long Insertion time

2006-10-11 Thread Will Leshner
On 10/10/06, Lloyd <[EMAIL PROTECTED]> wrote: For me consistancy, atomicity...(ACID) are not a problem. But the speed of operation is major constraint. How can I achieve speed in insertion cases like this? Are you doing these insertions in a transaction?

Re: [sqlite] sqlite3_close doesn't release always the file handle.

2006-09-22 Thread Will Leshner
On 9/22/06, Ran <[EMAIL PROTECTED]> wrote: What I do is to open a database, and start a transaction in it. Then, without ending the transaction, open again the database and simply close it. I found out, that the inner sqlite3_close return 0 (SQLITE_OK), but the file handle is not released. So

Re: Re: [sqlite] cwd error?

2006-09-21 Thread Will Leshner
On 9/21/06, AJ <[EMAIL PROTECTED]> wrote: Oh, it created one in the cwd, not the place where i thought the DB should be... is there a way to turn that 'feature' off, so that i can prevent that from happening, i'd prefer just an error. You could test for the file's existence before trying to

Re: [sqlite] cwd error?

2006-09-21 Thread Will Leshner
On 9/21/06, AJ <[EMAIL PROTECTED]> wrote: any ideas? You haven't really opened the database you think you have? What happens when you do: SELECT * FROM sqlite_master; - To unsubscribe, send email to [EMAIL

Re: RE: [sqlite] Error: file is encrypted or is not a database

2006-09-12 Thread Will Leshner
On 9/12/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: Thanks, but this application resides on a PDA and my customer is reporting this issue on several PDA's. No search/replace operations are being performed at a file level on these devices. Ah. Ok. It was just a shot in the dark. I've

Re: [sqlite] Error: file is encrypted or is not a database

2006-09-12 Thread Will Leshner
On 9/12/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: What in the world could have caused this?? Is it possible that you did some kind of global search and replace on files on your computer and this database file accidently got snagged?

Re: [sqlite] An estimate on how many users?

2006-09-04 Thread Will Leshner
On 9/4/06, bhyrkas <[EMAIL PROTECTED]> wrote: Also, there is rad developer platform that user SQLite. It deplooys to most handhelds. It deploys to are Palm, Pocket PC, Encore Simputer, Amida Simputer, Symbian OS 6.0, 6.1,7.0 handhelds. As well as Windows PCs and Linux PCs. Believe this or not. I

Re: [sqlite] duplicate primary key

2006-08-25 Thread Will Leshner
On 8/25/06, Mario Frasca <[EMAIL PROTECTED]> wrote: what is going on here? I'm having three records with the same NULL primary key. Well, not the same. NULL values aren't equal to anything, including another NULL value.

Re: [sqlite] spanish chars

2006-08-23 Thread Will Leshner
On 8/23/06, Preston Z <[EMAIL PROTECTED]> wrote: the problem is when i get the data through the C api with a call to sqlite3_get_table, the chars are missing/distorted. Are they missing/distorted, or, is the method you are using to inspect them not understanding the encoding they are in. You

Re: Re: [sqlite] date data types

2006-08-04 Thread Will Leshner
On 8/4/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: SQLite never has to figure out if the value in a field is a date or a time. There is no way for it to determine this. Woops. I guess I thought it did. Sorry for the confusion.

Re: [sqlite] date data types

2006-08-04 Thread Will Leshner
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 a value is a date or

Re: [sqlite] RE: UNICODE Support

2006-08-04 Thread Will Leshner
On 8/3/06, Cory Nelson <[EMAIL PROTECTED]> wrote: I recommend using utf-16 in the database - sqlite doesn't fully support utf-8, and some things may give unexpected results if you use it. As with others who have replied, I have not had a problem working with UTF8 in a SQLite database.

Re: [sqlite] SQLiteSpy - new topic

2006-07-22 Thread Will Leshner
On 7/21/06, Hartwig Wiesmann <[EMAIL PROTECTED]> wrote: is there a similar program as SQLiteSpy for other platforms available? I am especially interested in programs running on MacOS X. You might want to check out SQLiteManager:

Re: [sqlite] how to flush database to disk?

2006-07-16 Thread Will Leshner
On 7/14/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: That's interesting. What is "the F_FULLFSYNC syncing method" (since I am running on Mac OS X)? For what it's worth, PRAGMA FULLFSYNC returns 0 on my database. I believe the F_FULLSYNC syncing method is a method implemented by Apple

Re: Re: [sqlite] how to flush database to disk?

2006-07-16 Thread Will Leshner
On 7/14/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: I'm using the Commit method. I can try executing the COMMIT SQL command instead. Though as another poster pointed out, I shouldn't really need to do either, since I'm not using BEGIN. The REAL SQL Database (the REALbasic database

Re: Re: [sqlite] how to flush database to disk?

2006-07-14 Thread Will Leshner
On 7/14/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: Yet my observations indicate that the database hadn't written anything to disk in two days (or if it had, it somehow decided to roll back the last two days' worth after the crash). Any insight on that? It really sounds like you've

Re: [sqlite] how to flush database to disk?

2006-07-14 Thread Will Leshner
On 7/14/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: It's acting as though all the changes were held in memory, or somehow journaled, and when the crash happened, the changes were all lost or rolled back. What I need is a way to force the database to save its data to disk while my app

Re: [sqlite] Encoding with spanish characters

2006-07-13 Thread Will Leshner
On 7/13/06, Pedro J. Vivancos <[EMAIL PROTECTED]> wrote: No, I'm no sure. How can I test it? I've just started to learn C/C++ and I have no idea how to do it. While it is theoretically possible to test the encoding of the string, I'm not sure how practical it is. I think it would be easier to

Re: [sqlite] Encoding with spanish characters

2006-07-12 Thread Will Leshner
On 7/12/06, Pedro J. Vivancos <[EMAIL PROTECTED]> wrote: I'm developing a program using C++ and SQLite3 as database. I have a problem with encoding when I try to execute a SQL query with some characters like "ñ, á, é, í, ó, ú". My db is UTF-8 encoded and when I'm debugging I can see that the

Re: [sqlite] sqlite3 on MacOSX

2006-07-09 Thread Will Leshner
On 7/9/06, Hartwig Wiesmann <[EMAIL PROTECTED]> wrote: What am I doing wrong? Are you using the version of the sqlite command-line utility that comes with Tiger? If so, it isn't going to be compatible with the database you created, unless you are careful to create an old-legacy database. Try

Re: [sqlite] sqlite3_column_text question

2006-06-30 Thread Will Leshner
On 6/30/06, Alexei Alexandrov <[EMAIL PROTECTED]> wrote: Why does it return *unsigned* char *? Just const char * would seem more natural Perhaps because it is returning UTF8 and that needs to be unsigned, not signed?

Re: [sqlite] Looking for sqlite3.h header file

2006-06-22 Thread Will Leshner
On 6/22/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: I'd be grateful if someone could tell me where to look for it (or send me a copy), or if that's even the right file to use with the DLL. I believe it is generated during make, which is why you probably can't find it. But I believe it is

Re: [sqlite] Duplicate records (null handling)

2006-06-17 Thread Will Leshner
On 6/17/06, David M. Cook <[EMAIL PROTECTED]> wrote: I took it to mean NULL is distinct from any other value, not that each NULL is distinct from any other NULL. I believe it means that NULL is distinct even with itself. In other words, I believe NULL == NULL is false.

Re: [sqlite] Duplicate records (null handling)

2006-06-17 Thread Will Leshner
On 6/17/06, David M. Cook <[EMAIL PROTECTED]> wrote: says that nulls are distinct in a column, but I haven't found that to be the case (this is a test with 3.3.5) create table foo (bar text, baz text, unique(bar, baz)); select * from foo; bar|baz quux|null quux|null quux|null

Re: [sqlite] NOT NULL in create table command not work

2006-05-24 Thread Will Leshner
On 5/23/06, Nguyen Dang Quang <[EMAIL PROTECTED]> wrote: But my application still insert emty string into DIRECTORY field An empty string? Or NULL? There is a difference.

Re: [sqlite] Transactions and sqlite3_last_insert_rowid

2006-04-17 Thread Will Leshner
On 4/17/06, Michael Ekstrand <[EMAIL PROTECTED]> wrote: > So, if someone could enlighten me as to the defined behavior of > sqlite3_last_insert_rowid with regards to transactions, I would be most > grateful. The last insert id is a property of a connection. So there is no way that one connection

Re: [sqlite] SQLite3 command line utility crashes on MacOS X

2006-04-14 Thread Will Leshner
On 4/14/06, Thomas Chust <[EMAIL PROTECTED]> wrote: > I just downloaded the 3.3.5 distribution tarball and confirmed that the > problem occurs with a binary built from that codebase as well. I assume you guys are refering to the tip, right. If I download the "stable" 3.3.5 distribution and build

Re: [sqlite] questions about performance

2006-04-12 Thread Will Leshner
On 4/12/06, Jerome Alet <[EMAIL PROTECTED]> wrote: > However any of these command line tools MUST be interruptible > with Ctrl+C (for example) by the user who launched them, for > example because of a typo in the command, or something like that. If you are using SQLite directly, you might want

Re: [sqlite] questions about performance

2006-04-12 Thread Will Leshner
On 4/12/06, Jerome Alet <[EMAIL PROTECTED]> wrote: > All the test program does in the mainloop is a bunch of INSERT > queries all on the same table, but all INSERTS (millions of them) > are done within a single SQL transaction. Are you doing millions of inserts in one transaction?

[sqlite] file locking on Mac OS X

2006-04-03 Thread Will Leshner
Mac OS X 10.4.6 was just released today with this interesting fix: "file access and byte range locking with AFP file sharing". There is some chance this meansn that SQLite locking will now work on shared volumes on OS X.

Re: [sqlite] Sqlite on MacOSX Network File System

2006-02-03 Thread Will Leshner
On Feb 3, 2006, at 10:12 AM, Deepak Kaul wrote: Can you explain the you mean by "I don't know if I would ever trust NFS." I'm not that familiar with its shortcomings. Do you have any other suggesting other than NFS? Is AFP any better? My misgivings are based on the things I've read on

Re: [sqlite] Decimal separator

2006-01-31 Thread Will Leshner
On Jan 31, 2006, at 1:42 PM, Bert Verhees wrote: It is only the English speaking part of the world using Arabic numerals is a '.', And the Japanese speaking world :) -- REALbasic news and tips: http://rbgazette.com KidzMail & KidzBlog: http://haranbanjo.com

Re: [sqlite] journal files and database corruption

2006-01-20 Thread Will Leshner
On Jan 20, 2006, at 8:25 AM, Will Leshner wrote: Thanks for this information. It sounds like a reasonable precaution might be not to make "too many" changes to a database in one transaction. But I guess knowing how many changes is too many would be a pretty hard thing to

Re: [sqlite] journal files and database corruption

2006-01-20 Thread Will Leshner
On Jan 20, 2006, at 8:07 AM, [EMAIL PROTECTED] wrote: Deleting a hot journal after a power loss or OS crash is more likely to result in severe database corruption, but database corruption is possible from deleting a hot journal after an ordinary program crash. Thanks for this information.

Re: [sqlite] journal files and database corruption

2006-01-20 Thread Will Leshner
On Jan 20, 2006, at 7:41 AM, [EMAIL PROTECTED] wrote: The database might be completely unusable. It depends on which writes completed and which had not at the time of the crash. Am I right in thinking that that would be more likely to happen in, say, a hardware failure, and less likely to

[sqlite] journal files and database corruption

2006-01-20 Thread Will Leshner
In the article about locking and concurrency on the SQLite website, where it talks about how to corrupt a SQLite database, it says that a SQLite database can be corrupted if a hot journal file is missing when SQLite reconnects to the database. What kind of corruption are we talking about,

Re: [sqlite] Thread handling in Windows

2006-01-11 Thread Will Leshner
On Jan 11, 2006, at 7:43 AM, [EMAIL PROTECTED] wrote: Seems like nothing ever is. (sigh) My life would be so much simpler if Bill Gates has stayed in school long enough to take just one course in operating systems... LOL! That's about the funniest thing I've ever heard. Do we have

Re: [sqlite] implementing editable result sets

2005-12-20 Thread Will Leshner
On Dec 20, 2005, at 10:46 AM, Fanda Vacek wrote: If you parse such a simple query like SELECT [*,] bla [, bla] FROM table-name WHERE blabla , you'll get into less troubles than if you play with the rowid trick. All you need is to check if returned colnames can be found in table-name. And

Re: [sqlite] implementing editable result sets

2005-12-20 Thread Will Leshner
On Dec 20, 2005, at 10:19 AM, Robert Simpson wrote: What I'm left with are the alias names and original database table and column names for all the fields in the query, complete with information on whether or not any field is a primary key, how many different tables are involved in the

Re: [sqlite] implementing editable result sets

2005-12-20 Thread Will Leshner
On Dec 20, 2005, at 7:46 AM, John Stanton wrote: I haven't looked closely at the problem, so these are just first ideas extending CM's approach. Basically there should be no reason to perform any analysis of the SQL since that has already been done and the metalanguage generated. My

[sqlite] implementing editable result sets

2005-12-19 Thread Will Leshner
Hi. I apologize in advance for the length of this question, but it is a little involved. I am the author of a wrapper for SQLite and in that wrapper there is an object called a RecordSet that represents the results of a query. One of the things you can do with a RecordSet is edit records.

Re: Re[2]: [sqlite] multiple Db's and journal file time hit?

2005-12-19 Thread Will Leshner
On Dec 19, 2005, at 8:32 AM, Teg wrote: I notice a similar thing with my databases when they get to any decent size. it seems like the first time you access them, doing anything, there's a decent startup delay and then it's fast from that time forward. Someone mentioned OS disk cache and I

Re: [sqlite] RSS code patch

2005-12-15 Thread Will Leshner
On Dec 15, 2005, at 12:21 PM, [EMAIL PROTECTED] wrote: http://www.cvstrac.org/cvstrac/tktnew Thanks!

[sqlite] RSS code patch

2005-12-15 Thread Will Leshner
If a person wanted to propose a patch to the code that generates the RSS from the timeline messages, where would be a good place to start? In other words, where does that code live? Is that something that we mortals can look at in order to suggest changes? The reason I ask is because I

Re: [sqlite] The correct way to use the utf encoding?

2005-12-01 Thread Will Leshner
On Dec 1, 2005, at 7:03 PM, hubdog wrote: Now , I need encode my text in utf8 and pass them as insert sql to a utf8 encoding sqlite database and then I query the database to get the string inserted previously and manully decode the string from utf8 to ansi to display them. I don't believe

Re: [sqlite] Request for comment: Proposed SQLite API changes

2005-11-03 Thread Will Leshner
[EMAIL PROTECTED] wrote: What about this change? Is it a worth-while tradeoff? Personally, I would like to see both of these changes.

Re: [sqlite] seeking sqlite3_progress_handler advice

2005-10-06 Thread Will Leshner
On Oct 6, 2005, at 10:57 AM, [EMAIL PROTECTED] wrote: Figure 10 to 20 microseconds per opcode. I'd say around 100. Thanks. That makes sense. Please note that the counter resets with each call to sqlite3_step(). That is very good to know. Does that mean that if I set the count too

[sqlite] seeking sqlite3_progress_handler advice

2005-10-06 Thread Will Leshner
I'm wondering if anybody has any suggestions for a good number to pass as the second argument to sqlite3_progress_handler to indicate how many opcodes to wait before the progress handler is called. I realize it depends on a great many factors, so it is probably impossible to come up with a

Re: [sqlite] Network-based DB performance for Mozilla

2005-09-13 Thread Will Leshner
On Sep 13, 2005, at 3:19 PM, Brett Wilson wrote: The patch says "improve and support locking on the OSX platform (as well as others)". I see at least some enums in there for MSDOS NFS, etc. Well, looking closer at the code, I'm beginning to think it might very well be a generic solution

Re: [sqlite] Network-based DB performance for Mozilla

2005-09-13 Thread Will Leshner
On Sep 13, 2005, at 2:19 PM, D. Richard Hipp wrote: Apple has contributed patches to SQLite that claim to fix this problem. Those patches may one day find their way into the default release. In the meantime, you can find the patches at: I'm not positive, but I think the Apple patches are

Re: [sqlite] how to store date/time in sqlite?

2005-09-13 Thread Will Leshner
On Sep 13, 2005, at 11:07 AM, Mark Wyszomierski wrote: Moving from a mysql database to sqlite. I had some date/time fields in my mysql database. I would just populate them using the now() function. How could I achieve the same in my new sqlite database? This page might be helpful:

Re: [sqlite] SUM and NULL values

2005-09-08 Thread Will Leshner
On Sep 8, 2005, at 11:33 AM, D. Richard Hipp wrote: SUM ignores NULLs. So if it ignores everything, it returns the sum of nothing, which is 0. (Not the 0.0 issue is fixed in CVS HEAD.) As a data point, MySQL returns NULL for a SUM over fields that are all NULL. I am not suggesting, of

Re: [sqlite] SUM and NULL values

2005-09-08 Thread Will Leshner
On Sep 8, 2005, at 11:33 AM, D. Richard Hipp wrote: SUM ignores NULLs. So if it ignores everything, it returns the sum of nothing, which is 0. (Not the 0.0 issue is fixed in CVS HEAD.) Ah. Perhaps I shouldn't have filed a bug report then. Sorry about that. I wonder what other databases

[sqlite] SUM and NULL values

2005-09-08 Thread Will Leshner
Say I have a column called 'b' in a table called 'test' and every field in 'b' has a NULL value. What is the expected behavior of the following query: SELECT SUM(b) FROM TEST; I guess I'm thinking I'll get back NULL. Instead I get 0 (or, in the 3.2.5 code, 0.0). On the other hand, the

Re: [sqlite] SQLite3 backward compatibility

2005-08-24 Thread Will Leshner
On Aug 24, 2005, at 7:41 PM, Firman Wandayandi wrote: Does SQLite3 compatible with SQLite2 databases? If yes, so I can manage the SQLite2 database using SQLite3 engine. No, and no.

Re: [sqlite] Delete crashes with Version 3.2.4 in Windows XP

2005-08-24 Thread Will Leshner
On Aug 24, 2005, at 10:46 AM, Brown, Dave wrote: Has anyone created (or is logging) a testbed so that new versions of SQLite can be run through some regression tests? Might want to add this one to the mix if so. SQLite is one of the most regression tested piece of code I've ever seen.

Re: [sqlite] Why can i open a textfile?

2005-08-20 Thread Will Leshner
On Aug 20, 2005, at 1:38 PM, D. Richard Hipp wrote: There might be a bug. If SQLite sees a file that is less than 1024 bytes in length, it might assume (mistakenly) that it is empty and then overwrite it. I'll have to check on that. If it does, this should be considered a bug. Ok. It

Re: [sqlite] Why can i open a textfile?

2005-08-20 Thread Will Leshner
On Aug 20, 2005, at 1:38 PM, D. Richard Hipp wrote: There might be a bug. If SQLite sees a file that is less than 1024 bytes in length, it might assume (mistakenly) that it is empty and then overwrite it. I'll have to check on that. If it does, this should be considered a bug. Yes. That

Re: [sqlite] Why can i open a textfile?

2005-08-20 Thread Will Leshner
On Aug 20, 2005, at 11:33 AM, Edwin Knoppert wrote: Oops.. good bye simple telephone list! I just added a table and the list is replaced by an sqlite db. Right. That's what I thought. The wrapper I develop is very careful to check to make sure a file is really a SQLite database before

Re: [sqlite] Why can i open a textfile?

2005-08-20 Thread Will Leshner
On Aug 20, 2005, at 9:21 AM, D. Richard Hipp wrote: SQLite never "blows away" a file that is not a database. Sorry to use such crude language :) But I believe I have run into an issue with SQLite reformatting a non-sqlite file as a SQLite database. I will try to reconstruct the problem

Re: [sqlite] Why can i open a textfile?

2005-08-20 Thread Will Leshner
On Aug 20, 2005, at 1:25 AM, Edwin Knoppert wrote: v3.2.1, i opened a textfile containing a simple list not related to sqlite. Was testing my error handler but it still opens it. Do you mean you called sqlite3_open? I believe sqlite3_open does not yet test to see if the database is truly

Re: [sqlite] mixing GROUP and non-GROUP columns in a query

2005-08-11 Thread Will Leshner
On Aug 11, 2005, at 10:48 AM, Vladimir Zelinski wrote: Sqlite does return some kind of result for incorrect SQL queries. I consider that this is a non-critical bug that should be fixed in future I think I might submit this as a bug, then. Thanks.

Re: [sqlite] mixing GROUP and non-GROUP columns in a query

2005-08-11 Thread Will Leshner
On Aug 11, 2005, at 10:19 AM, [EMAIL PROTECTED] wrote: In any case, there's no defined way to determine *which* row the non-group data will be returned from, so at best, it's an unreliable query. I was kind of hoping it might be a "compile"-time error. That seems to be what MySQL is

Re: [sqlite] mixing GROUP and non-GROUP columns in a query

2005-08-11 Thread Will Leshner
On Aug 11, 2005, at 10:19 AM, [EMAIL PROTECTED] wrote: This must be typo. You probably mean that you get back 3|3. Oops. That's right. That's what I get for typing it in by hand :)

[sqlite] mixing GROUP and non-GROUP columns in a query

2005-08-11 Thread Will Leshner
Say I have a table defined and populated as follows: CREATE TABLE test (a TEXT); INSERT INTO test (a) VALUES ('hello'); INSERT INTO test (a) VALUES ('hello'); INSERT INTO test (a) VALUES ('hello'); And I perform the following query: SELECT rowid,count(a) FROM test In SQLite I get back:

Re: [sqlite] possible documentation error

2005-08-10 Thread Will Leshner
On Aug 10, 2005, at 12:38 PM, Kurt Welgehausen wrote: AS is always optional, i.e., in table names and in column names. That's what I thought as well. But the documentation doesn't reflect that. It isn't a huge deal, of course, but people looking at the docs for the right syntax might

[sqlite] possible documentation error

2005-08-10 Thread Will Leshner
It would seem that if you alias tables in the FROM clause of a SELECT statement, the "as" that falls between the real table name and the alias is optional. But the lang_select.html page seems to indicate that it is required (there aren't any square brackets around the "AS" in the

Re: [sqlite] Extracting database schema information

2005-08-08 Thread Will Leshner
On Aug 8, 2005, at 5:14 AM, Matthew Gertner wrote: I'm wondering if there is a way to get information about the format of tables in an existing Sqlite database. Specifically, I would like to get the list of columns and the data type of each column. Check out the table_info PRAGMA on this

Re: [sqlite] Re: Calling sqlite3RunParser directly to just *parse* SQL code

2005-08-05 Thread Will Leshner
On Aug 5, 2005, at 9:15 AM, scunacc wrote: Perhaps, but as I was working up to this - dry-running and dbx/gdb'ing the code I wanted to avoid actually verifying the SQL against extant database tables (and running any kind of caching "preparation"), so I was approaching it from a "ground up"

Re: [sqlite] Re: Calling sqlite3RunParser directly to just *parse* SQL code

2005-08-05 Thread Will Leshner
On Aug 5, 2005, at 6:51 AM, scunacc wrote: I'm probably doing all sorts of things wrong here, but this seemed enough (by empirical messing around :-) to get the answers I was interested in, which was whether the SQL would parse or not for a given statement. It might be nice if there were

Re: [sqlite] Commit and Rollback

2005-07-28 Thread Will Leshner
On Jul 28, 2005, at 4:29 AM, Edwin Knoppert wrote: And i wish for a test if the transaction is already set or not, without using a callback. You already can: " int sqlite3_get_autocommit(sqlite3*); Test to see whether or not the database connection is in autocommit mode. Return TRUE

Re: [sqlite] Make Windows use UTF-8

2005-07-13 Thread Will Leshner
On Jul 13, 2005, at 3:28 AM, Simon Posnjak wrote: is there a way to make Windows (2k, XP, ...) write the sqlite db in UTF-8 format? I need to do this becouse I will use the db on Linux box which uses UTF-8. Thank you. If you insert only UTF-8 data into the database, it will be UTF-8.

[sqlite] possible bug in lockBtree

2005-07-10 Thread Will Leshner
I think there might be a bug in this code in lockBtree: if( sqlite3pager_pagecount(pBt->pPager)>0 ){ u8 *page1 = pPage1->aData; if( memcmp(page1, zMagicHeader, 16)!=0 ){ goto page1_init_failed; The problem is if you are trying to open a non-sqlite file that is smaller than

Re: [sqlite] Update variable problems. Bug?

2005-07-03 Thread Will Leshner
On Jul 3, 2005, at 11:59 AM, Tom Shaw wrote: Now there should be nothing wrong with the above that I can see BUT if I change the DB variable name from ip to ip_num all works OK Strings are quoted with single quotes, not double quotes. Double- quoted strings are interpreted as column

Re: [sqlite] Error : Library routine called out of sequence

2005-06-28 Thread Will Leshner
On Jun 28, 2005, at 5:08 AM, Ajay wrote: I am trying to insert values into table and executing that query from thread. There are 2 more threads that accesses same table. Do all the threads use the same sqlite handle? I believe that can cause problems.

Re: [sqlite] Sqlite low level and Speed.

2005-06-20 Thread Will Leshner
On Jun 20, 2005, at 7:42 AM, Jay Sprenkle wrote: for i:=1 to 1000 do begin tran insert or on conflict fail into testtable(val) values(StringN); commit end for Shouldn't the transaction wrap the loop?

Re: [sqlite] How to Lock other threads out of DB until specifically UNlocking the DB?

2005-06-17 Thread Will Leshner
On Jun 17, 2005, at 11:18 AM, [EMAIL PROTECTED] wrote: However, I need transactions for other purposes, as my process is running it will need to BEGIN and COMMIT/ROLLBACK transactions all the while holding the lock on the file. Ah. You were hoping the transactions would be nested? That is

Re: [sqlite] How to Lock other threads out of DB until specifically UNlocking the DB?

2005-06-17 Thread Will Leshner
On Jun 17, 2005, at 10:52 AM, [EMAIL PROTECTED] wrote: Yes, a BEGIN EXCLUSIVE does lock it, but then as soon as I do some other SQL, it automatically UN LOCKS the db unfortunately. I need to keep it locked until I unlock it. I'm not sure I believe you :) I would assume the database would

Re: [sqlite] How to Lock other threads out of DB until specifically UNlocking the DB?

2005-06-17 Thread Will Leshner
On Jun 17, 2005, at 9:57 AM, de f wrote: The automatic locking of Transactions in sqlite does not give me direct control and is of no use to me (those locks go away automatically, leaving me no control over them.) Are you sure? Have you investigated BEGIN EXCLUSIVE?

  1   2   3   >