Android Question Connecting to SQL Lite Bank(DB file) on the Host from within the Android app?

Jim2025

Member
My bank on the host is a SQL Lite DB file. Is there a way from within my Android app to connect to the DB file on the host without having to download that bank file and add, delete, edit or search information in it? Basically, I want to do something similar to connecting to that file remotely. Anybody have any suggestions?
 

josejad

Expert
Licensed User
Longtime User
If you have access to the server where the DB is hosted, and you can run java on it, then you can use a jRDC2 server to access the data:

 
Upvote 0

Jim2025

Member
It's just a regular Windows or Linux host. Is there another way or idea to connect to a SQLite DB file from within Android?
 
Upvote 0

DonManfred

Expert
Licensed User
Longtime User
It's just a regular Windows or Linux host.
Then setup a jRDC2 on it and connect to the jRDC2-.Server from Android.
Is there another way or idea to connect to a SQLite DB file from within Android?
Beside using a SQLite directly on Android itself, no. SQLite is not made for multiple connections.

You can switch to a more powerful database like MySQL, MariaDB
 
Upvote 0

Jim2025

Member
I have previously had experience connecting remotely to banks such as SQL Server on Windows or MySQL on Windows, provided that the drivers are installed in Windows and that the host allows remote access. I have even worked on connecting to a SQL Server bank remotely on Android before, but I deliberately raised the title in a way that it is known that my bank is a SQLite bank that is in the form of a single file and does not allow remote access.

If I want to explain in more detail :
The host that I have purchased, or rather I have purchased for 1 year, is a regular Linux host with limited DirectAdmin panel management and is not a server that I can manage on my own. I have features that support PHP, MariaDB, MySQL and SQL Lite. My site is also already designed based on connecting to SQL Lite bank. One of the reasons I chose this bank over other banks was the goals I was looking for in the future, such as the ability to download a single bank file or upload it or from Since Android supports SQL Lite files, I can connect to them. I know that if I want to do it in an intermediary way, I can use the PHP language to connect between my Android app and the SQL Lite database on my host. But I don't want to do this method. I want to either do something creative or new, or if there is a way in B4A that I can connect to that single file.

For example, code like the following:
custtomliborcustomclass.connecttodb(http://aaa/bb/filedb.db):
And then I can do things like delete, edit, search, record, etc. I guess maybe I can also create a connection with the help of memory or stream or dll or any old or new or creative method, but I'm new to Android and don't have much experience.If there is no such way, perhaps at least the method of connecting and performing the operations mentioned above can be quickly tested.
 
Upvote 0

aeric

Expert
Licensed User
Longtime User
If your hosting plan is a basic shared hosting then you are only limited with the choice of PHP.
Some shared hosting also offer NodeJS, CGI-Bin and PERL but I don't think you would consider to build a server based on these technologies.
I would recommend to get a new VPS hosting such as Hostinger where the subscription price is almost the same as shared hosting but you get full control of the virtual OS.
Otherwise, just go with PHP and MySQL/MariaDB. If you want to use SQLite, consider using a PHP framework.
 
Upvote 0

Jim2025

Member
I am not looking for server design at all, I have worked with VPS before and they are very expensive, especially since I have to pay a very heavy monthly fee. My host is probably one of these shared hosts that have many limitations in the control panel, but I already know most of this information. I am looking for a way that I can connect to a single file of SQLite DB remotely and even without using an intermediary language like PHP that I mentioned before, because if I want to use this language, this method can be used for all databases. Can't an advanced class or Java capabilities or a method in Android create such a possibility that can be connected to a single file of DB on the host?

I am even looking for new or creative ideas.
 
Upvote 0

teddybear

Well-Known Member
Licensed User
custtomliborcustomclass.connecttodb(http://aaa/bb/filedb.db):
And then I can do things like delete, edit, search, record, etc. I guess maybe I can also create a connection with the help of memory or stream or dll or any old or new or creative method, but I'm new to Android and don't have much experience.If there is no such way, perhaps at least the method of connecting and performing the operations mentioned above can be quickly tested.
It is impossible to connect directly to sqlite db via network. as sqlite is serverless relational database management system.
 
Upvote 0

Shelby

Well-Known Member
Licensed User
Longtime User
Some of the members here use SQLite DB Browser. I'm one of those members. It is a very effective and fast way of editing ones data base. It's free to download and use. Here are some links: https://github.com/sqlitebrowser/sqlitebrowser
https://sqlitebrowser.org/ (seems to be down now) I have version 3.13.1 (it's the latest).


The DB Browser for SQLite is a visual, open-source application that allows users to create, design, and edit SQLite databases. It offers a spreadsheet-like interface, controls, and wizards that bypass the need for SQL commands, and allows users to create and edit tables, search for records, import and export records and tables, and more. While some users praise its ease of use and flexibility, others criticize its clumsy interface and lack of support options....
 
Last edited:
Upvote 0

Jim2025

Member
I have been using this software for several years, based on my experience, I suggest using DBBrowser(SQLCipher) with password(encryption) capabilities.

Untitled.png

I'm still waiting for more answers and would welcome any ideas or methods that others may have experienced.
 
Last edited:
Upvote 0

MrKim

Well-Known Member
Licensed User
Longtime User
You can't do it and to do it would be insane. You are talking about directly editing a database on another machine from the client. If you do that (and that is what Microsoft access does) you WILL, eventually, corrupt the database. All it takes is to drop the connection in the middle of an update or delete and you can kiss your DB goodbye.
 
Upvote 0
Top