Error disk i/o with sqlite - basic4ppc6.8

alessandro

Member
Licensed User
Help Me!
With version 6.8 basic4ppc error occured on sqlite Insert querry.
Recompiled with v6.8
Copy new file System.Data.SQLite.Device.dll, SQLite.Interop.060.dll ,....
in device emulator wm6 . Error all querry insert
Disk i/o error occured in sqlite :BangHead:
Thanks and best regards
 

Attachments

  • error sqlite.jpg
    error sqlite.jpg
    18.1 KB · Views: 289

RB Smissaert

Well-Known Member
Licensed User
Longtime User
Could you check the integrity of the SQLite file:
PRAGMA integrity_check

You say emulator, so do you mean this error occured on the desktop?

If the DB file is small then maybe you could post it plus the insert SQL.

RBS
 

giannimaione

Well-Known Member
Licensed User
Longtime User
it is a "old problem" with emulator!!!
one year ago, i have same error ; because i have not a PDA .
i don't remeber if i have a solution

maybe i have change a name of folder-windows or
maybe APPPATH not work.
i think i have used this:
myBbSL3="\tmp\myDataBase.sl3" , where "\tmp" is a folder on Hard-Disk.

sorry, but i not remember well :BangHead:
 

giannimaione

Well-Known Member
Licensed User
Longtime User
Alessandro, sei italiano?
 

alessandro

Member
Licensed User
Si , Italiano
e' dal tuo cognome provabile anche molto vicini 150 km max.
Ora provo a cambiare il path .
Con la versione 6.5 non c'era nessun problrma.
Ciao

Effettivamente AppPath da errore questo vuol dire un bug della versione 6.8 (capita solo sull'emulatore wm6).
 
Last edited:

giannimaione

Well-Known Member
Licensed User
Longtime User
a parte il cognome, ma come vedi dall'immagine avatar e dalla mia location, io sono di Napoli... and you?
 

agraham

Expert
Licensed User
Longtime User
I'm puzzled :confused:. This simplification of alessandros' TestInsertSQL.sbp appears to work fine in the IDE but when optimised compiled for the desktop I get an "Object reference not set to an instance of an object" error at line 11.

The error is in this line of code in Class1.cs
"__main_cmd = new B4PSQL.Command (@"",__main_con.Value);"

Anybody know what's wrong? I can't see it so it's probably something obvious :(.

EDIT:- FOUND IT! The real problem is this line in the constructor of Command
"scaleX = (double) Thread.GetData(Thread.GetNamedDataSlot("scaleX"));"
As there is no Form in the example Other.SetScale has not been called to create the DataSlots. :( Add a Form and it works.
 
Last edited:

RB Smissaert

Well-Known Member
Licensed User
Longtime User
Thanks for figuring that out.
Was just going to have a look at this and I don't think I would have found that one!

RBS
 

alessandro

Member
Licensed User
Compiled for Device .
Not Running only Device Emulation wm6 .
Error disk i/o

OK Running windows , OK Running on Device acer n311 , hp ipaq214.
 

agraham

Expert
Licensed User
Longtime User
I assume that you have, like me, mapped the project directory to the Storage Card on the emulator. I get the same disk I/O error on the WM 5.0 emulator. The problem is not AppPath as you can see by deleting local.db3, it gets recreated OK.

According to my DebugRecompiler the error is occurring on the first "Cmd.ExecuteNonQuery". If I comment that out it occurs on the next ExecuteNonQuery, I have no idea why :confused:

EDIT:- I've traced as far as I can and the problem seems to be in System.Data.SQLite.Device.dll or even further into SQLite. I suspect this is a problem associated with the new structure of the SQLite device libraries compared to the previous version. Unless I get a sudden flash of brilliance I don't think I can get any closer to what the actual problem is.
 
Last edited:

alessandro

Member
Licensed User
Hi agraham
new test_insert.sbp with 6 test
1:Connect
2:Drop table
3:Create table
4:Read Table
5:Insert Table
6:close con

All the tests are OK on windows and Device (Acer n311wm5) & (Ipaq214 Wm6)

Device EMULATION WM5
Test Con,Read,Close OK Device Emulation WM5
Test Drop Table (if table EXISTS) error Disk i/o Device Emulation WM5.
Test Create Table error Disk i/o Device Emulation WM5.
Test INSERT Table error Disk i/o Device Emulation WM5.

Device EMULATION WM6
Test Con,Read,Close OK
Test Create Table error Disk i/o but it has been Created Correctly
Test INSERT Table error Disk i/o but it has been Inserted Correctly

Task that is a problem of the new librarie sqlite V 1.060 ?
In the site (sqlite.phxsoftware.com)they have published a new version V 1.0.62.

Best Regards

****************
Resolved
Copying from Shared folder in Device\Programs (Internal directory device emulator) all test OK in device emulator Wm5 & Wm6 NOT Error disk i/o

****************
 
Last edited:

glook

Member
Licensed User
Longtime User
Does anyone have any update information or advice on the subject of this thread? (Sorry if I missed it somewhere else, then please give me a pointer)

I have the same problem. I don't use the emulator very much because it has never run well on my PC, but I need it now for different screen sizes.

As Alessandro correctly says, the error is only with the shared folder (storage card) - no error if the program is copied to a device folder. However I cannot test my whole application as it is too big to copy to an internal folder.

The error I get is "Some kind of disk I/O error occurred" when doing an SQLite write action. The rest of the program runs OK. The program runs correctly on the real device and on the desktop ide (debug). An old 6.50 version of the program runs in the emulator with no errors.

I've checked the shared folder security for full permissions and reinstalled the whole emulator package on another PC. I'm using emulator 6.0 and 6.1 images. I have not tried the 6.5 emulator yet.

Geoff.
 

glook

Member
Licensed User
Longtime User
Certainly looks like that is the issue. Thanks for the link.

It's not critical for me, but it makes testing a bit tricky. It is mostly the screen layouts that need the emulator, so it's possible to work around the errors.
 
Top