[sqlite] Database corrupt after hard reboot. Can it be repaired?

2015-10-19 Thread Paul Sanderson
Gunnar If the data is very important then don't do anything that will change the computer. If you have sometools that can take an image copy of the disk (DD to another drive) or maybe the free accessdata imaging software then I would recommend doing this first - it will leave all options open

[sqlite] Database corrupt after hard reboot. Can it be repaired?

2015-10-19 Thread gunnar
Thanks a lot Simon! We'll try it. (BTW I also got an email from alexa, but looking in the sqlite mailing list I can see that I'm not the only one) On 10/19/2015 06:20 PM, Simon Slavin wrote: > On 19 Oct 2015, at 5:13pm, gunnar wrote: > >> We run sqlite with PRAGMA synchronous=OFF. >> >> Now

[sqlite] Database corrupt after hard reboot. Can it be repaired?

2015-10-19 Thread gunnar
Hi, We run sqlite with PRAGMA synchronous=OFF. Now we suffered from a 'hard reboot' because a sysadmin unplugged the power cable :( Is it possible to repair when you see after that: OrderCallbackStorage::checkDatabaseIntegrity: row 1 [*** in database main *** On tree page 413956 cell 2:

[sqlite] Database corrupt after hard reboot. Can it be repaired?

2015-10-19 Thread Simon Slavin
On 19 Oct 2015, at 5:13pm, gunnar wrote: > We run sqlite with PRAGMA synchronous=OFF. > > Now we suffered from a 'hard reboot' because a sysadmin unplugged the power > cable :( > > Is it possible to repair First take a copy of the database file and any other file from the same directory

[sqlite] Another unexpected source of SQLITE_BUSY_SNAPSHOT

2015-10-19 Thread Dan Kennedy
On 10/18/2015 10:27 PM, Florian Weimer wrote: > My first surprise was SQLITE_BUSY_SNAPSHOT from BEGIN IMMEDIATE (see > ?SQLITE_BUSY_SNAPSHOT from BEGIN IMMEDIATE?). I have found another > source of such snapshot failures with WAL-mode databases. > > I like to pre-compile my DML statements before

[sqlite] Problem with sqlite3_create_function

2015-10-19 Thread Bart Smissaert
> The "context" passed to a user defined function is not and cannot be a "statement handle". Yes, you are right there. Not sure now how I thought it was a statement handle, but this doesn't alter the problem. Thanks in any case for correcting this mis-conception. RBS On Mon, Oct 19, 2015 at

[sqlite] printf with thousands separator

2015-10-19 Thread Clemens Ladisch
Bruce Hohl wrote: > Is printf with thousands separator working for anyone? No. SQLite's printf is designed for database-internal processing (e.g., sorting), and does not support locales. Formatting values for display is the responsibility of the application. (The sqlite3 command-line shell has

[sqlite] Problem with sqlite3_create_function

2015-10-19 Thread Bart Smissaert
Still getting a crash here if I use the UDF more than once in the same statement: So, table with 2 integer columns and then doing: select XXX(field1), XXX(field2) from table1 causes a crash. I can see that the statement prepares fine and that the UDF gets called twice (for the first row), but

[sqlite] Problem with sqlite3_create_function

2015-10-19 Thread Hick Gunter
The "context" passed to a user defined function is not and cannot be a "statement handle". How would an aggregate function tell the difference between Select SUM(x) ... and Select SUM(x), SUM(y) ... if not by virtue of sqlite3_aggregate_context() returning different adresses?

[sqlite] Compilation fails under Linux (Ubuntu) when FTS5 is enabled

2015-10-19 Thread Rowan Worth
On 18 October 2015 at 04:15, wrote: > I just tried one more time with the -lm switch and this time it worked. > Hmm... > > Problem solved. Thanks. You might find that specifying -lm *after* the .c files works but -lm before the .c files doesn't. The linker processes libraries/object files in

[sqlite] Compilation fails under Linux (Ubuntu) when FTS5 isenabled

2015-10-19 Thread to...@acm.org
That's very likely what happened the first, must have put the -lm option before the .c files :( (Not a regular gcc user.) Thanks. -Original Message- From: Rowan Worth Sent: Monday, October 19, 2015 6:43 AM To: General Discussion of SQLite Database Subject: Re: [sqlite] Compilation

[sqlite] Fw: SQLlite with Gui4Cli

2015-10-19 Thread Gert Venter
I apologize! I sent this (very incomplete) question to the wrong forum late at night after some very frustrating hours searching for a solution! Please ignore it. I found my answer on the Gui4Cli site (SQL3.dll) and can now hopefully proceed to produce Gui4Cli apps using a sqlite3 database. I

[sqlite] Alexa Phishing

2015-10-19 Thread Gert Venter
I also received an eMail from alexa within 15 minutes after registering. GAV

[sqlite] Problem with sqlite3_create_function

2015-10-19 Thread Bart Smissaert
Actually, I can see now that the result of sqlite3_extended_errcode(lDBHandle) is in fact the same as the result of sqlite3_step as I get for the 3 rows 100, 100, 100, 101 so SQLITE_ROW 3 times then SQLITE_DONE. Note sure though why this is and why I get unknown error as a result of

[sqlite] Problem with sqlite3_create_function

2015-10-19 Thread Bart Smissaert
Some progress with this. Still get an error: unknown error, Extended error code: 100, but it all runs and get the right results and no crash. Problem was I did put the result of sqlite3_step in a VB Long datatype: Dim lStepResult As Long lStepResult = sqlite3_step(lStatementHandle) Now I do

[sqlite] SQLlite with Gui4Cli

2015-10-19 Thread Gert Venter
I?m using SQLite 3.9.0 on Windows 8.1 I?m a long time database developer (mainly Oracle, MySQL) but recently started using SQLite. I?m currently trying to develop a small project using Gui4Cli (here I?m a newbie) and SQLite as database. The Gui4Cli database docs are not very helpful with this