Android Example SQLite, remote connection

Discussion in 'Tutorials & Examples' started by biggiu, Mar 5, 2015.

  1. biggiu

    biggiu Member Licensed User

    Hello.
    I have the following problem: I can not find an example of code written to run a remote connection to a SQLite DB.
    I used the DRC to connect to a DB MS-SQL.
    I do not understand if the DRC is also useful for SQLite DB.
    If the DRC is also used to connect to SQLite DB, I do not understand what code to use to do this.
    The procedure works with three tablet. A tablet is the owner of DB others must connect and work on that DB.

    Thank you all for your cooperation.
     
  2. Erel

    Erel Administrator Staff Member Licensed User

  3. biggiu

    biggiu Member Licensed User

    Hi Erel,
    sorry but I could not make anything work.
    I followed all the examples but I really can not solve the problem.
    I have attached my configuration of the server and the client to try to figure out where the problem lies.
    On my PC I created the folder c: / tmp. I copied the DB codedb.sqlite.
    The config file I have tried before with codedb.sqlite and then with codedb but I got nothing.
    The IP address 192.168.1.100 refers to my work PC, which also resides B4A.
    It 'strange that I was able to connect to a MS-SQL DB and I can not do it with SQLITE.

    You can try to help me?
     

    Attached Files:

    • RDC.zip
      File size:
      58.3 KB
      Views:
      263
  4. Erel

    Erel Administrator Staff Member Licensed User

    There are extra spaces in the JdbcUrl value.
     
  5. biggiu

    biggiu Member Licensed User

    Sorry but don't work.
    I tried two different examples, mine and that of Luca Messina.
    Neither one works.
    I attach the DB test.
    I attach the config of LM.
    The driver used is: sqlite-jdbc-3.7.2
     

    Attached Files:

  6. Erel

    Erel Administrator Staff Member Licensed User

    config-mw.properties is wrong as there are spaces in the url.

    Which error do you get when you use the correct url?
     
  7. biggiu

    biggiu Member Licensed User

    I think I have solved.
    There were two problems:
    Spaces too, and the name of the DB that was not nome.db but nome.sqlite
    Now I can connect.
    I do other tests and hope not to have other problems.
    Thanks for your kind cooperation.
    Good Job.
     
Loading...
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice