in

System.Data.SQLite

An open source ADO.NET provider for the SQLite database engine

Some kind of disk I/O error occurred

Last post 12-15-2010 5:51 AM by SteveMc. 7 replies.
Page 1 of 1 (8 items)
Sort Posts: Previous Next
  • 05-27-2007 11:48 AM

    Some kind of disk I/O error occurred

    Hello,

     

    I use version 1.0.40.0.

    There is a problem when I place my database on a storage card of Device Emulator (version 2.0).

    I can read data from the database but when I try to write to the database I receive the exception: “Some kind of disk I/O error occurred

    disk I/O error”

    All works fine if I place the database in any other folder (not a storage card). I use Windows Mobile 5.0 image.

     

    Regards,

    Vladimir

  • 06-01-2007 5:16 AM In reply to

    • Delf
    • Top 25 Contributor
    • Joined on 11-02-2006
    • France, Paris
    • Posts 37

    Re: Some kind of disk I/O error occurred

    Are you able to write on the storage card?

    Try to write a simple file using StreamWriter from your application that uses Sqlite. Same issue?

    Delf
  • 06-03-2007 4:10 AM In reply to

    Re: Some kind of disk I/O error occurred

    I could write text files by System.IO.File.CreateText.
  • 06-03-2007 11:26 AM In reply to

    Re: Some kind of disk I/O error occurred

    I'm not really sure what the problem could be.  Are you using the Windows 5.0 Emulator, or an actual 5.0 device?  If not, have you tried the code on an actual device or on the emulator to see if it works there?

    Robert

     

  • 06-04-2007 3:34 AM In reply to

    Re: Some kind of disk I/O error occurred

    The code works on an actual device with the database anywhere.

     

    The problem happens when using a device emulator. I use a device emulator version 2.0 (for Windows Mobile 6.0) with Windows Mobile 5.0 images. I can read the database data wherever I place my database: either on a storage card of the device emulator or anywhere in the file system. But I can create databases or write to a database only if the database is placed NOT on a storage card of the device emulator. Creating a database or writing to a database placed on a storage card of the device emulator throw the exception: “Some kind of disk I/O error occurred”. I tried to create text files on a storage card of the device emulator from my application and this works:

     

    using (StreamWriter writer = new StreamWriter(pathToTextFile))

    {

        writer.WriteLine("Test");

    }

     

    Regards,

    Vladimir

  • 08-21-2007 11:32 PM In reply to

    Re: Some kind of disk I/O error occurred

    Having the same problem. It appears this other user also had a similar issue (after solving others): http://sqlite.phxsoftware.com/forums/p/284/1106.aspx#1119

    Instead of copying DB file over to device emulator as part of build, I have instead put it in a folder I've shared with the emulator as the virtual 'Storage Card'. Reading the DB is fine, trying to run an UPDATE or INSERT results in this error. No other actual file i/o operations performed on the Storage Card result in errors.

    Copying the DB over to the emulator as part of the build resolves the problem, but it would be ideal if we could get the virtual Storage Card functionality to work - ie, this makes it easier to have changes to the DB made by my app persist after the emulator has closed down, and I can easily view the DB in the shared folder using external tools.

  • 10-08-2007 5:14 AM In reply to

    Re: Some kind of disk I/O error occurred

    Yes, I'm seeing this problem now as well. It seems there's something strange going on with the Device Emulator not being perfectly compatible with writes here, however still working with writes in many other cases. I could successfully rename files on the shared storage card, for example.

    Hmm, sucks a bit for me because due to another bug, Visual Studio 2006 can't deploy things to the real device since a while back, always stalling at:

    ------ Deploy started: Project: ..., Configuration: Debug Pocket PC 2003 (ARMV4) ------
    An operation was attempted on something that is not a socket

    I haven't been able to resolve that error even after re-installing ActiveSync, Visual Studio 2005, and doing a hard reset on the device. :-(

    So I was using the emulator to circumvent when I now stumbled upon this one. :-p

  • 12-15-2010 5:51 AM In reply to

    Re: Some kind of disk I/O error occurred

    For those looking for a solution to this error, one solution that worked for me was raised in the forum thread here.

    Basically it involves using the PRAGMA statement to change the journal mode. I posted a coded example in c# at http://www.stevemcarthur.co.uk/blog/post/Some-kind-of-disk-IO-error-occurrede28093SQLite.aspx


    Filed under: , , ,
Page 1 of 1 (8 items)
Powered by Community Server (Commercial Edition), by Telligent Systems