Welcome, Guest. Please login or register.
Did you miss your activation email?
31 Jul 2010, 11:37:19 UTC
Forum home
+  flexdeveloper.eu Forum
|-+  AIR
| |-+  AIR (Moderators: JMWhittaker, Jan K, thewarpedcoder, James)
| | |-+  need help with SQLite database location
« previous next »
Pages: [1] Print
Author Topic: need help with SQLite database location (Read 677 times)
fifin04
Newbie FD
*
Posts: 4


« 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
Logged
flexy
flexdeveloper.eu
Guru/Addict FD
*****
Posts: 3,155


Recovering Coffee Addict & Adobe Expert


WWW
« Reply #1 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");
Logged

fifin04
Newbie FD
*
Posts: 4


« Reply #2 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)
Logged
RoBB
Newbie FD
*
Posts: 23

Enjoy Life WillYa


WWW
« Reply #3 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.
Logged
fifin04
Newbie FD
*
Posts: 4


« Reply #4 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
Logged
Pages: [1] Print
« previous next »
Share this on: Twitter Twitter Del.icio.us del.icio.us Digg Digg
Jump to:

©2006-2010 Flexdeveloper.eu/Jodie O'Rourke. All rights reserved.
Adobe®, Adobe® Flash™, Adobe® AIR™ and Adobe® Flex™ are registered trademarks of Adobe Systems Incorporated in the United States and other countries. All rights reserved.

Powered by SMF 1.1.11 | SMF © 2006-2009, Simple Machines LLC