Results 1 to 9 of 9
  1.    #1  
    Hi all,

    In my app i declare an external HTML5 database using Mojo.Depot.

    Here is the code in main-assistant.jsjsjs :

    function MainAssistant() {
    var options = {
    name: "ext:mydatabase",
    version: 1,
    replace: false
    };
    this.depot = new Mojo.Depot(options, this.dbConnectionSuccess, this.dbConnectionFailure);
    }


    When i test my app on the emulator, all works great. I'm able to create and get values.

    Also, i'm able to find this database using PuTTY.
    This db is in
    /media/internal/.app-storage/file_.var.usr.palm.applications.com.zepal
    epot_0/ 0000000000000008.db

    My question are:
    - Is there a way to export this database on my PC ?
    - Which tool must i use to edit this database ?

    Thanks
  2.    #2  
    Thanks for your reply vanadium.
    Go in via the CLI
    What is the meaning of CLI ?

    That i forgot to say is that i don't have a Pre device.

    Is there a way to export db from the emulator to my PC ?

    Thanks
  3. #3  
    Quote Originally Posted by Ze-Palm View Post
    Thanks for your reply vanadium.

    What is the meaning of CLI ?

    That i forgot to say is that i don't have a Pre device.

    Is there a way to export db from the emulator to my PC ?

    Thanks
    using putty to the emulator follow the instructions here to set up the emulator to talk to "normal" ssh software.

    Next steps - WebOS Internals

    then, from the command line in putty (which is what CLI means, command line interface) copy that db file to an un hidden directory.

    then download a copy of winscp and use it to transfer the file out to your PC.

    You can then manipulate the file with sqlite on the pc, and you can use winscp to put it back.

    Note however, that you ___CAN NOT___ distribute a populated database to the Pre when you install an app.
  4. #4  
    In Windows just change your folder settings to show hidden files/folders and then in USB mode just drag and drop it to your computer. No need to putty, copy, etc.

    Edit: this works if you have a device. For the emulator follow rboatright's instructions.
  5.    #5  
    Thanks to all.

    I give a try applying rboatright's instructions and let you know.
  6.    #6  
    I've followed and applied the method described in "Next steps - WebOS Internals" => Enable a virtual disk and installation of Optware in the Emulator.
    All was fine during this installation.

    Then, using PuTTY, i've copied with success the database from /media/internal/.app-storage/file_.var.usr.palm.applications.com.zepalm.depot_0 to the folder tmp

    Then i've dl and installed WinSCP but i'm unable to run a session.
    As i want to export a database from the emulator, i enter in the corresponding fields :
    Host name: localhost
    Port number: 5522
    User name: root
    no password
    Protocol: SFTP

    I tried to enter different values such as IP of my PC in the field Host name, Port number: 222, ... but each time a window appears with the following message:
    Network error:Connection refused

    Where i'm wrong ?
    What are the correct values to enter in order to run a WinSCP session ?

    Thanks in advance for your helps.
  7. #7  
    use protocal scp not sftp
  8. #8  
    and try port 22
  9.    #9  
    Thanks for your replies rboatright.

    I set scp instead of sftp and port 22 but i've the same message => Network error:Connection refused

    Concerning the Host name, i enter localhost.
    Is it correct ?
    If not, which host name i must enter ?

    Thanks for your helps.

Posting Permissions