Accessing db file using IP Address

  1. 2 months ago

    Arief S

    Jan 7 Bandung - Indonesia

    Hi,
    I want to access my sqlite database file from other PC. is it possible to do it in xojo ?

    What I did so far is, share the folder in other PC and accessing by do typing ,

    192.168.1.2/db/file01.db. [db folder is shared with read&write access]

    Its works, but seem its not the safe way to do it, because, while sharing the db folder, I have to granted read & write access, which is very unsafe.

    one of POS software that I have used [coded in dot.net], its easy, while client app is installed, I just type the server IP address only, then I can get connected to the database.

    does anyone has some sample how to do that in xojo ?

    thanks
    regards,
    arief

  2. @Arief S — Well, you should not use an SQLite DB for that. SQLite was made as a simple, versatile local database manager. By contrast, many other DB (MySQL, PostgreSQL...) are meant to be accessed over the network, not locally.

    I think you should install a network database and convert your SQLite DB to it.

    I just type the server IP address only, then I can get connected to the database

    That is possible only for network DB engines because they have a dedicated port number. In order to access a SQLite file, the full URL will be always required.

  3. It is unsafe for security but also the stability of the database file. Sqlite isn't the best solution for multiuser database. Reading only over network may be ok but regarding writing, if stored on a network share it may damage the file if a network connection is dropped while writing to the file. MySQL, PostgreSQL is better for this purpose. I think there a couple of others if you need something lightweight -i think CubeSQL may be quite lightweight.

  4. Jonathan E

    Jan 7 Pre-Release Testers, Xojo Pro Las Vegas, NV

    @Karl M MySQL, PostgreSQL is better for this purpose.

    I vote for PostgreSQL. Decades of development behind it. A sizeable and generally friendly user base. Powerful, quick and fairly light. Not to mention it's completely free and open-source.

  5. Richard D

    Jan 7 Pre-Release Testers, Xojo Pro Europe (UK, London)

    @Karl M It is unsafe for security but also the stability of the database file. Sqlite isn't the best solution for multiuser database. Reading only over network may be ok but regarding writing, if stored on a network share it may damage the file if a network connection is dropped while writing to the file. MySQL, PostgreSQL is better for this purpose. I think there a couple of others if you need something lightweight -i think CubeSQL may be quite lightweight.

    i agreed that you can use CubeSQL and keep the sqlite file format.
    i have use CubeSQL without any problem for many years now.. (probably since 2006)

  6. Arief S

    Jan 7 Bandung - Indonesia

    Thanks for all the input.
    moving to PostgreSQL seems the best way to do it.

    regards,
    Arief

or Sign Up to reply!