Error 11 - Database disk image is malformed

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

Error 11 - Database disk image is malformed

Ian Hardingham
Hey guys.

I have this table:

eloResultTable (id INTEGER PRIMARY KEY AUTOINCREMENT, player TEXT, elo
FLOAT)

(I also happen to have this index: CREATE INDEX IF NOT EXISTS
eloResultScore ON eloResultTable (elo DESC))

This query works fine:

SELECT * FROM eloResultTable

This query returns Error 11 - Database disk image is malformed

SELECT * FROM eloResultTable ORDER BY elo DESC

Any ideas?

Thanks,
Ian
_______________________________________________
sqlite-users mailing list
[hidden email]
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
Reply | Threaded
Open this post in threaded view
|

Re: Error 11 - Database disk image is malformed

Simon Slavin-3

On 8 Sep 2011, at 2:22pm, Ian Hardingham wrote:
> This query works fine:
>
> SELECT * FROM eloResultTable
>
> This query returns Error 11 - Database disk image is malformed
>
> SELECT * FROM eloResultTable ORDER BY elo DESC

Please run "PRAGMA integrity_check;" on the database.  You can code it into one of your own apps or use the 'sqlite3' shell tool.

<http://www.sqlite.org/pragma.html#pragma_integrity_check>

Which API are you using to make changes to the database ?
Does your database have any TRIGGERs or FOREIGN KEYs in ?

Simon.
_______________________________________________
sqlite-users mailing list
[hidden email]
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
Reply | Threaded
Open this post in threaded view
|

Re: Error 11 - Database disk image is malformed

Ian Hardingham
Hi Simon.

I do not have any TRIGGERs or FOREIGN KEYs.

I execute PRAGMA integrity_check and get no useful return... certainly
no errors.

I'm using a custom wrapper which uses this to execute stuff:

iResult = sqlite3_exec(m_pDatabase, sql, Callback, (void*)pResultSet,
&m_szErrorString);

Thanks,
Ian

On 08/09/2011 14:29, Simon Slavin wrote:

> On 8 Sep 2011, at 2:22pm, Ian Hardingham wrote:
>> This query works fine:
>>
>> SELECT * FROM eloResultTable
>>
>> This query returns Error 11 - Database disk image is malformed
>>
>> SELECT * FROM eloResultTable ORDER BY elo DESC
> Please run "PRAGMA integrity_check;" on the database.  You can code it into one of your own apps or use the 'sqlite3' shell tool.
>
> <http://www.sqlite.org/pragma.html#pragma_integrity_check>
>
> Which API are you using to make changes to the database ?
> Does your database have any TRIGGERs or FOREIGN KEYs in ?
>
> Simon.
> _______________________________________________
> sqlite-users mailing list
> [hidden email]
> http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

_______________________________________________
sqlite-users mailing list
[hidden email]
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
Reply | Threaded
Open this post in threaded view
|

Re: Error 11 - Database disk image is malformed

Pavel Ivanov-2
In reply to this post by Ian Hardingham
> This query works fine:
> SELECT * FROM eloResultTable
> This query returns Error 11 - Database disk image is malformed
> SELECT * FROM eloResultTable ORDER BY elo DESC
> Any ideas?

REINDEX eloResultScore;

should help you.


Pavel


On Thu, Sep 8, 2011 at 9:22 AM, Ian Hardingham <[hidden email]> wrote:

> Hey guys.
>
> I have this table:
>
> eloResultTable (id INTEGER PRIMARY KEY AUTOINCREMENT, player TEXT, elo
> FLOAT)
>
> (I also happen to have this index: CREATE INDEX IF NOT EXISTS eloResultScore
> ON eloResultTable (elo DESC))
>
> This query works fine:
>
> SELECT * FROM eloResultTable
>
> This query returns Error 11 - Database disk image is malformed
>
> SELECT * FROM eloResultTable ORDER BY elo DESC
>
> Any ideas?
>
> Thanks,
> Ian
> _______________________________________________
> sqlite-users mailing list
> [hidden email]
> http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
>
_______________________________________________
sqlite-users mailing list
[hidden email]
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
Reply | Threaded
Open this post in threaded view
|

Re: Error 11 - Database disk image is malformed

LincolnBurrows
This post has NOT been accepted by the mailing list yet.
In reply to this post by Ian Hardingham
the error can occure due to virus infection or due to bad network connections see here: http://sqliteviewer.com/blog/how-to-resolve-sqlite-error-code-11.html