Re: [sqlite] SQLite version 3.7.5
> As of this release, the popular ADO.NET provider for SQLite by Robert > Simpson, System.Data.SQLite, is hosted on the SQLite website. See > http://System.Data.SQLite.org/ for additional information. Release builds > of System.Data.SQLite will appears on the SQLite download page over the > course of the next week. EESS Finally we get up-to-date versions of this ADO.NET Provider! THANKS! THANKS! THANKS! Bye, Michael ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
Re: [sqlite] usleep bug?
> Since the time for sleeping is an integer number of seconds it's probably > simplest just to replace this call with one to sleep(10). sleep() is defined > in POSIX.1 so I believe it should be available in a library for every > platform SQLite is expected to run on. Windows has no sleep() - butis has Sleep(). #ifdef __WINDOWS__ #define sleep(x) Sleep(x * 1000) #endif Bye, Michael ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
Re: [sqlite] typo in src/os_os2.c
> Do you have an OS/2 compile capability? The SQLite developers do not. We > would appreciate your assistance in testing SQLite on OS/2. If you can You don't have OS/2 or you can't get it working? OS/2 is about $US 5 on eBay. AFAIK it runs not under VMWare but I've read that it runs under bochs, qemu and MS Virtual PC Bye, Michael ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
Re: [sqlite] SQLite for .NET Framework 4.0
Daniel schrieb: > does anyone know if there is a support for SQLite in .NET Framework 4.0. As always: http://sqlite.phxsoftware.com/ -- Yours sincerely Michael Knigge Development S.E.T. Software GmbH Lister Straße 15 30163 Hannover GERMANY Tel. +49 511/3 97 80-23 Fax +49 511/3 97 80-65 michael.kni...@set-software.de Commercial Registry: HRB52778 Local Court Hannover Chief Executive Officer: Till Dammermann, Dr. Bernd Huber ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
Re: [sqlite] SQLite turns 10 years old
> Thanks, everybody, for helping to make SQLite the most widely deployed > SQL database engine in the world. And Happy 10th Birthday to SQLite! No, *WE* have to thank *YOU* for this great piece of work, that you give to use for free! Amazing! Thank you! bye, Michael ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
Re: [sqlite] SQL questio
All, > (Disclaimer: I'm german and miss the right tone quite often.) I haven't followed this thread but just to be clear: We germans are not rude by nature :-) But we germans usualy tend to "say what we think", in exactly the words that we think (at least here in hannover, there was an article about this in the last issue of the german magazine "Schädelspalter" - "skullsplitter" may be a good translation) If we think something is crap, than we usually say "hey, that's crap" ;) The uk or us folks may prefer "I don't like the idea.". bye, Michael P.S.: As said, I haven't followed the issue about Florian, but please don't think we germans are rude by nature ;-) ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
Re: [sqlite] SQLite version 3.6.21
>> And what compiler are you using that is sensitive to these violations >> yet generates no warnings? > > It's the very nature of undefined behaviour that it does not require a > warning. Welcome to the world of C. Is the compiler you use a secret? Do you have to kill us if you tell the name/version of the compiler to us? Or why don't you give this (maybe) important information? Bye, Michael P.S.: Have you changed the compiler Options? Maybe you've played around with the "-O" option? ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
Re: [sqlite] onthefly Compression of SQLite database
> VARCHARs. In total, my SQLite database is about 100MB. Very, very huge. 100 MB? Come on, this isn't that "BIG" > It seems that compressing an SQLite database is very efficient. Is there > any way to compress/decompress a whole database on the fly ? Well, you could license the CEROD extension, see http://www.hwaci.com/sw/sqlite/cerod.html If this is too expensive for you, you could think about using the compression techniques built into your operating system. So you could use the compression of NTFS-Filesystems to use compression on the fly (you can compress individual files and don't need to compress a complete drive or directory). But check the performance! Hey... as I'm thinking about that this would be something usefull... an extension to the function sqlite3_open_v2(F,D,G,0): The third paramater could get a flag named "SQLITE_OPEN_COMPRESSED" - this would create the file "ntfs-compressed" if it doesn't exist Bye, Michael ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
Re: [sqlite] ODBC drivers are faster than NAtive C API why?
> I tried to execute some SQL queries using drivers(sqliteodbc) and Native c > API but i found that ODBC drivers are working twice faster than c API. > Why this behavior is coming as c APIs are supposed to be faster than > drivers? May be the old issue: You've been using transactions with your ODBC-Test and no transaction with your C-API test? > Any thought on this would be appreciated. Any source would be nice ;-) Bye, Michael ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
Re: [sqlite] What is the advantage of using native c API over ODBC
> Hi All, > What are the basic advantage of using SQLite with C API over ODBC. 1. Better Performance. 2. You can use SQLite Features that are not "mappable" to the ODBC-API. 3. You don't have to worry if there are Bugs in the ODBC-Driver. 4. No need to install the ODBC-Driver to let your Application run 5. You can use the latest SQLite release ando don't have to wait until the author of the ODBC driver releases a new version. bye, Michael ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
[sqlite] GCC Compiler Warnings
Hi, my C skills are not the very best, but GCC reports some warnings when compiling 3.6.10 (amalgamation) and I guess GCC is right: if( unlink(zLockFile) ) { int rc, tErrno = errno; if( ENOENT != tErrno ) { rc = sqliteErrorFromPosixError(tErrno, SQLITE_IOERR_UNLOCK); } if( IS_LOCK_ERROR(rc) ){ pFile->lastErrno = tErrno; } return rc; } The value of "rc" is undefined if unlink() returnes ENOENT (this could happen I think). I guess removing the if() around sqliteErrorFromPosixError is the right fix. The other two warnings are harmless I think. GCC complains that "pLock" may be used uninitialized in function findLockInfo. I guess this could not happen, but coding a simple "else" to the "if( ppLock!=0 ){" that sets pLock to NULL would not hurt. Also, GCC complains that iKey might be used uninitialized in function sqlite3VdbeExec (around line 52486, see "case OP_Delete:"). I would suggest to initialize iKey always (just after "pC = p->apCsr[i];"). This simple assignment doesn't hurt but saves the "even more complex" if statement "if( db->xUpdateCallback && pOp->p4.z )". I've attached little patch against the 3.6.10 amalgamation Bye, Michael --- orig/sqlite3.c 2009-01-15 11:00:44.0 +0100 +++ sqlite3.c 2009-01-22 11:44:49.0 +0100 @@ -22679,7 +22679,7 @@ struct unixLockKey lockKey;/* Lookup key for the unixLockInfo structure */ struct unixFileId fileId; /* Lookup key for the unixOpenCnt struct */ struct stat statbuf; /* Low-level file information */ - struct unixLockInfo *pLock;/* Candidate unixLockInfo object */ + struct unixLockInfo *pLock ;/* Candidate unixLockInfo object */ struct unixOpenCnt *pOpen; /* Candidate unixOpenCnt object */ /* Get low-level information about the file that we can used to @@ -22751,7 +22751,10 @@ pLock->nRef++; } *ppLock = pLock; + }else{ + pLock = NULL; } + if( ppOpen!=0 ){ pOpen = openList; while( pOpen && memcmp(, >fileId, sizeof(fileId)) ){ @@ -23573,11 +23576,11 @@ /* To fully unlock the database, delete the lock file */ assert( locktype==NO_LOCK ); - if( unlink(zLockFile) ){ -int rc, tErrno = errno; -if( ENOENT != tErrno ){ - rc = sqliteErrorFromPosixError(tErrno, SQLITE_IOERR_UNLOCK); -} + if( unlink(zLockFile) ) + { +int tErrno = errno; +int rc = sqliteErrorFromPosixError(tErrno, SQLITE_IOERR_UNLOCK); + if( IS_LOCK_ERROR(rc) ){ pFile->lastErrno = tErrno; } @@ -52489,6 +52492,7 @@ assert( i>=0 && inCursor ); pC = p->apCsr[i]; assert( pC!=0 ); + iKey = pC->lastRowid; assert( pC->pCursor!=0 ); /* Only valid for real tables, no pseudotables */ /* If the update-hook will be invoked, set iKey to the rowid of the @@ -52497,7 +52501,6 @@ if( db->xUpdateCallback && pOp->p4.z ){ assert( pC->isTable ); assert( pC->rowidIsValid ); /* lastRowid set by previous OP_NotFound */ -iKey = pC->lastRowid; } rc = sqlite3VdbeCursorMoveto(pC); ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
Re: [sqlite] SQLite file security
> Now my question is how I can provide security to my database for > example no one can access my database except my application .how can I > provide security o encrypt data by yourself o buy the properitary encryption add-on from hwaci.com o code your appl with .NET and use the ADO-Provider (supports encryption, see http://sqlite.phxsoftware.com/) Bye, Michael ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
Re: [sqlite] sqlite .dll package doesn't have .h file
Joshua Hudson schrieb: > A precompiled .dll package is provided. I want to use it. > The package doesn't contain a .h file to #include in my program. > > Now what? Download the source and take the .h file from the source code? Just as an idea ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
Re: [sqlite] GCC give a warning while passing a struct as the user data to the callback function of sqlite3_exec()
> however, the program runs well. What may causing the warning? what > should i do to get rid of this warning. The warning is produced because your callback() isn't int callback(void *, int, char **, char **); try this: int callback(void *foo, int argc, char **argv, char **azColName) { MyStruct *data = (MyStruct *)foo; ... } haven't checked, but this should blow away the warning Bye, Michael ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
Re: [sqlite] SQLite 3.6.0 coming soon...
> Could be phrased better, but as it is it's perfectly correct. PRAGMA > page_count returns the size of the underlying database, measured in > units of pages needed. Yes, you are right - my fault. Sorry! bye, Michael ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
Re: [sqlite] SQLite 3.6.0 coming soon...
See page http://www.sqlite.org/draft/doc/35to36.html "Added the page_count PRAGMA for returning the size of the underlying database file in pages." I guess you mean "... the **count**" and not **size**. Bye, Michael ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
Re: [sqlite] malformed database file
Hi, Is the database really corrupt, or are you getting a spurious error? You can tell if the database is truely corrupt or not by running PRAGMA integrity_check; I will check this. And yes, every thread uses its own sqlite3* ;) Are you really sure of this? In my experience most of Yes. these kinds of problems end up being cases of threads doing things that their programmers were not aware of. Hmm. maybe ;-) At first I have to setup a test environment with my fellow so we can reproduce this problem. If we are able to reproduce this in a testcace (so we don't need to "hope" that the error occurs) I will post again here... Bye & Thanks so far, Michael
[sqlite] malformed database file
All, in a application with several threads (guess 6) we sometimes encounter a SQLITE_CORRUPT. I'm not the author of this application and my time is spare, but I really want to ensure that this is not an SQLite issue. Some hints how to debug this? Anythig I could turn on within SQLite so we can track this down? And yes, every thread uses its own sqlite3* ;) bye, Michael
Re: [sqlite] what if sqlite_finalize() fails?
THe bigger question is why you are designing a new system to work with SQLite-2. SQLite-2 is in maintenance for use on legacy Eh... sorry, I was in a hurry of course I use sqlite3_finalize()! systems. Use SQLite-3 instead. sqlite3_finalize() cannot fail for any reason other than SQLITE_MISUSE. Then have a look at http://www.sqlite.org/capi3ref.html#sqlite3_finalize All prepared statements must finalized before sqlite3_close() is called or else the close will fail with a return code of SQLITE_BUSY. Incomplete updates may be rolled back and transactions canceled, depending on the circumstances, and the result code returned will be SQLITE_ABORT. Bye, Michael
[sqlite] what if sqlite_finalize() fails?
All, I wonder what I have to do if sqlite_finalize() fails? sqlite_close() will fail if there are any prepared statements associated with a database handle - so I can't close. Due to the manual, sqlite_finalize() could return SQLITE_ABORT - do I have to call sqlite_finalize() again in this case? Thanks, Michael
Re: [sqlite] Re: Database Disk Full
Sigh... what is wrong with a message "disk full" when the disk space is exhausted? Why is simple and to the point a problem? The point is, that this error is returned everytime a write to the disk failed - even if (for example) the write failed because of a network error (NFS-Server is restarted for example). I remember that I've got a "disk full" message from MS-Word last year when I tried to print to a PDF-Printer (free space on my disk: 14 GB). Bye, Michael Drew, Stephen wrote: John, Thanks for the reply. I disagree - my error message informs my users (who are technonerds) that the disk or db file is full, when neither of these is the case. Surely you can see that even a different constant error message in this context would be preferable? SQLITE_WRITE_FAILED or something? As I say, I'm just altering the standard error text at the moment, because it is misleading. Steve -Original Message- From: John Stanton [mailto:[EMAIL PROTECTED] Sent: 11 February 2006 09:58 To: sqlite-users@sqlite.org Subject: Re: [sqlite] Re: Database Disk Full The first message informs all users of the problem. The one you propose might satisfy a technonerd, but confuse the more casual user. There is however a case for writing such a detailed message to syslog or similar system log. Dave Dyer wrote: It is a reasonable assumption to make that the only thing which can have changed since the last write is the disk becoming full. A disk cable falling off, head crash or mechanical disk failure is not only unlikely but would crash the entire machine and make error detection and recovery unlikely so testing for it is futile. It is reasonable for a program like sqlite to operate on the assumption that other hardware and software perform as intended, and not attempt heroic error recovery. On the other hand, sqlite operates in the real world, and wierd shit happens out there. When something goes wrong, every bit of information that is available should BE available to those trying to clean up the mess. There is a huge difference, coming in in the morning after an expected overnight run, finding it failed, and having the message database full verses having the message 09-feb-2006 03:13:12 database write failed, windows error code 14 for f:\temp\vacuumtemp.txt, current file size = 10200K -- Mit freundlichen Grüßen Michael Knigge S.E.T. Software GmbH Lister Str. 15 30163 Hannover Tel.: +49 511 / 3 97 80 -23 Fax: +49 511 / 3 97 80 -66 eMail: [EMAIL PROTECTED]
[sqlite] Duplicate keys
Hi, is the order, in which rows with duplicate keys are retrieved, specified? For example: A table with two columns - the first is a Index. If I INSERT in the following order: C1 C2 - 3 1 1 1 1 2 1 1 1 3 2 1 If I now do a "SELECT * FROM Table ORDER BY C1;", is it guranteed that the rows with identical "C1" are retrieved in "FIFO" order, as 1 1 1 2 1 1 1 3 2 1 3 1 Or is it somehow undefined?!?!? Thanks, Michael
Re: [sqlite] Sub-Select
Jakub Adamek schrieb: Michael, it is because SQLite 3.1.3 changed (or has errors in, it is a matter of opinion) the column naming. Try Thanks a lot - it works! Bye Michael
Re: [sqlite] Sub-Select
Hi, sorry... I forgot I get the error "no such column: Sub.Sendung" So I guess/hope it's only a "syntax error" with my SQL - my SQL-Skills are rather bad ;-( Thanks, Michael All, could someone please tell me why this query doesn't work with 3.1.3 (with 3.0.8 it works): SELECT max(Sub.Sendung) FROM (SELECT S.Sendung FROM Auftrag AS A, Sendung AS S WHERE(A.PosyDat = 1 AND A.PosyDat = S.PosyDat) AND (A.PosyNId = 6 AND A.PosyNId = S.PosyNId) AND (A.DateiNum = 1 AND A.DateiNum = S.DateiNum) AND (A.ReprintNum = 0 AND A.ReprintNum = S.ReprintNum) AND (S.Sendung >= 1 AND S.Sendung <= 600) LIMIT300) AS Sub; Thanks a lot, Michael
[sqlite] Sub-Select
All, could someone please tell me why this query doesn't work with 3.1.3 (with 3.0.8 it works): SELECT max(Sub.Sendung) FROM (SELECT S.Sendung FROM Auftrag AS A, Sendung AS S WHERE(A.PosyDat = 1 AND A.PosyDat = S.PosyDat) AND (A.PosyNId = 6 AND A.PosyNId = S.PosyNId) AND (A.DateiNum = 1 AND A.DateiNum = S.DateiNum) AND (A.ReprintNum = 0 AND A.ReprintNum = S.ReprintNum) AND (S.Sendung >= 1 AND S.Sendung <= 600) LIMIT300) AS Sub; Thanks a lot, Michael
[sqlite] How to close a cursor?
All, how do I close a cursor with SQLite --> I want to stop processing a SELECT before sqlite3_step() returns SQLITE_DONE... Is sqlite3_interrupt() the right way? Does sqlite3_interrupt() deletes the prepared SQL-Statement? Thank you, Michael
Re: [sqlite] OT: Compiling under Windows
All, What do you mean with "Multithreaded" or "Mulithreaded-DLL" project? Can you explain exactly where you can select between these two options, and whether you are using Visual Studio 6 or 2002/2003? Sorry for being not "precise" enough - english isn't my native language so it's sometimes "hard" to express something in english what is in my mind in german ;-) In the meantime I've read several manual pages and I guess the right way is to compile/link the library as a multithreaded DLL-project. DLL's are using the MSVCRT.DLL Run-Time Library and other projects (.EXE or .LIB) are using LIBC.DLL. And it's a bad idea to mix them ;-) So... I assume I should compile/link my static SQLite-Library as a "DLL-Project" and add link the resulting .lib file to my DLL-Project. Thank you all so far, Michael
[sqlite] OT: Compiling under Windows
Hello, this question is slightly OT here but. I want to compile SQLite as a library (not as a DLL) and add this library to my DLL-Project. Why? Because the C-Compiler from MS produces so many warnings and I want to compile all my own projects without even a single warning So I wonder what is correct: To compile/link the resulting sqlite.lib as a "Multithreaded" project or as a "Multithreaded-DLL" project? Remember, I want to add this sqlite.lib to my DLL Bye & Thanks, Michael