03-23-2011 03:39 AM
hi,
i have one small issue related to sqlite database. i am creating one sample example for sqlite, i am getting database was not created.Invalid path name. Path does not contains a proper root list. See FileSystemRegistry class for details.i am using 5.0 os and running on 9550 simulator.
i tried to search on it but it is telling about sd card.without sd card it wont work.please tell me what is the issue.
Thanks
03-23-2011 03:41 AM
can u give the code here???
03-23-2011 04:30 AM
hi,
I am using this site for sqlite.
http://today.java.net/article/2010/03/17/getting-s
Thanks
03-23-2011 04:37 AM - edited 03-24-2011 01:11 AM
try to configure SDCard for your simulator, or use phone memory as is:::
"file:///store/Databases/database1.db"
03-23-2011 07:54 AM
hi,
Thanks a lot for replying.
1. Any one please tell me how to configure SDCard in my simulator.
2. Now I can able to create database using sqlite, but i can not able to insert data into a table,
its displaying error as file system error(12)
please tell me how to fix this error.
Thanks
03-23-2011 08:08 AM
just create a file with the extension '-sdcard.dmp' (include starting hyphen'-' also)
in simulator go to simulate, change SD card then browse for the file u created
ur other problem is after 1st execution, bcz it already created db, if u again execute it, it can not create file again, thats y throwing filesystem exception.
03-23-2011 08:38 AM
hi,
please tell me what i have to do if throws filesystem error.
Thanks
03-23-2011 08:50 AM
instead of using DatabaseFactory.create(), use DatabaseFactory.openOrCreate()
03-24-2011 12:12 AM
hi,
I can able to create database using sqlite, but i can not able to insert data into a table,
its displaying error as file system error(12)
here is my code
URI myURI = URI.create("file:///store/Databases/database.db");
sqliteDB = DatabaseFactory.open(myURI);
Statement st = sqliteDB.createStatement("INSERT INTO Employee(Name,Age) " +
"VALUES ('Ralph',47)");
st.prepare();
st.execute();
please help me how to insert data and how to retrive it.
Thanks
03-24-2011 12:42 AM
here is no problem in the code, can u write here whole class, this code belongs to??