|
Title: need help with SQLite database location Post by: fifin04 on 11 Mar 2010, 04:03:04 UTC Hi guys....kind of stuck up....really need help so bad here..
here's the situation I'm developing Air application using flex builder 3 and of course using sqlite as my database...Everything is going ok so far...Except...Sqlite dtbase mngmnt really give me headache...because I dont have idea where to find my dtbase was created using code...fyi I'm using SQLite sorcerer Air application SQLITE dtbase mngmnt which is so great...so when i try to browse to see my database....I'm lost here...where exactly the database was place when we created using code ..so that I can manage the table using this SQLite sorcerer... Code: conn = new SQLConnection(); var dbFile:File = File.applicationStorageDirectory.resolvePath("DBSample.db"); try{ trace("database was created"); conn.open(dbFile); }catch(error:SQLError){ trace("Error message:", error.message); trace("Details:", error.details); } as well as to see my table also stmt = new SQLStatement(); stmt.sqlConnection = conn; var sqlcreatetbl:String = "CREATE TABLE IF NOT EXISTS user (" + " userId INTEGER PRIMARY KEY AUTOINCREMENT, " + " test TEXT " + ")"; stmt.text = sqlcreatetbl; try{ stmt.execute(); }catch(error:SQLError){ trace("Error message:", error.message); trace("Details:", error.details); } Hope someone will shed me some light ...and sorry for this silly question... tq in advanced..Really need help Title: Re: need help with SQLite database location Post by: flexy on 11 Mar 2010, 09:59:48 UTC If you create a database in the application storage directory, that should be where you find it the next time you need to use it.
Code: File.applicationStorageDirectory.resolvePath("DBSample.db"); Title: Re: need help with SQLite database location Post by: fifin04 on 12 Mar 2010, 01:00:06 UTC If you create a database in the application storage directory, that should be where you find it the next time you need to use it. Code: File.applicationStorageDirectory.resolvePath("DBSample.db"); Hi..flexy thans for the feedback....let make things clear here...really puzzle?..you mean it''t not actually created physical database but only create some space let say in Memory(correct me..if I'm wrong) Title: Re: need help with SQLite database location Post by: RoBB on 12 Mar 2010, 04:56:26 UTC what do you mean by
<<.because I dont have idea where to find my dtbase was created using code.. Are you creating this sqllite database in your app or not? i assume not. You can search your computer for the database and see where it is located. It should be in the applicationStorageDirectory as stated below, but that is not a sure thing. Title: Re: need help with SQLite database location Post by: fifin04 on 14 Mar 2010, 10:47:22 UTC Thanks for the reply guys
I get manage to locate my db now..do it as ur suggest huh copy dc ti worddb file and place it document directory tq again |