Welcome! Log In Create A New Profile

Advanced

sqlite3 help !!!

Posted by adebisi 
sqlite3 help !!!
April 17, 2010 05:11PM
hi.. i need to use this library and its giving me hard time
this is my code: (most of it)

fatInitDefault();
sqlite3 *db;
sqlite3_open_v2("sd:/apps/db/database.db", &db, SQLITE_OPEN_CREATE, "unix-none");
sqlite3_exec(db, "CREATE TABLE test (id INTEGER PRIMARY KEY, string TEXT);", NULL, 0, &errorMsg);

the last command throw an error : "db_createTable: disk i/o error"

if anyone could give me a code so i could use this library i will b grateful !!!!

thanks !!
Re: sqlite3 help !!!
April 19, 2010 02:02PM
I have been trying to use sqlite3 as well in the past few days and I gave up. I have been able to go past this disk i/o error but only got 'out of memory errors' after. I have tryied to debug the library but with no success. Even the provided example doesn't works.

So I looked on the net for an alternative and found MetaKit that is not really a database but it kind of acts like one. I ported it to the wii and have been able to use it. It works good enough for what I need to do.

If you are interested I can send it to you.

There is a good tutorial on the net about MetaKit.

Alex
Re: sqlite3 help !!!
April 19, 2010 02:23PM
Try
#include (sdcard/wiisd_io.h)
#include (fat.h)

//And instead of fatInitDefault() do this :

fatUnmount("sd:/");
__io_wiisd.shutdown();
fatMountSimple("sd", &__io_wiisd);



Edited 1 time(s). Last edit at 04/19/2010 02:23PM by Arikado.
Re: sqlite3 help !!!
April 19, 2010 05:32PM
I've had the same problem half a year ago, and didn't find a solution: [forum.wiibrew.org]
Re: sqlite3 help !!!
April 19, 2010 05:48PM
hi,

thank to everyone that tried to help.
the last code didnt succeed either.

alex, if u could send me the metakit library and the api i will like that.
thank u.
Sorry, only registered users may post in this forum.

Click here to login