02-06-2013 06:22 AM
I am trying to create a database in BB10 platform. I did create connection and yes I did make tables. But I couldn't find database anywhere in my source project. Is it that way? or not..? Also is there any way to view the tables and contents.
My database currently contain a table with one field for entering names. This is the path
Any help is appreciated
Thanks in advance
Solved! Go to Solution.
02-07-2013 04:42 AM - edited 02-07-2013 04:43 AM
Well I have not tried and verified this, but since you said "any help is appreciated" ...
Your db probably got created in your application storage directory, which is under
on your device and/or simulator. You may have to drill down from there but it should be under that
To get to it you can ssh into the sim and/or device with e.g. putty tools, which can be downloaded
You then probably want to copy the file to your development host using scp or (probably easier)
You can then probably view/modify your db using a sqlite shell for your development host OS.
Like I said I haven't tested any of this but that's what I'd try.
02-11-2013 09:35 AM
02-11-2013 02:54 PM
I doubt it got created, since you cannot write to the application directory, only the app-storage directory. So you need to write it there if you want it in the app's sandbox. You can write it to the shared directory where you then have easy access to it to inspect it with a SQLLite DB reader app.
John I'm not following your above comment - I was assuming the original poster's "folder" variable was an instance of
flash.filesystem.File, but wasn't assuming from their post that they were trying to write it to the applicaiton directory,
and in my response I did specify the app storage directory, not the app directory. I guess we'll have to wait to
hear back from the orginal poster as to where they were trying to write the db.
02-11-2013 03:27 PM
02-11-2013 09:51 PM
The way I read the original poster's message, it sounded like they were maybe expecting the database to get written into a file somewhere in their project directory - something which is not going to happen.
Even if you are iterating on business logic and running on your development host OS using adl, your db file is not going to get written in your project directory, but rather in your application sandbox on your host OS, which on e.g. a Windows XP box will be something like:
C:\Documents and Settings\<username>\Application Data\<application name>\