Android Question External database

Peekay

Active Member
Licensed User
Longtime User
I have written a Diary program for a PC for our company which handles messages, appointments, reminders and a whole lot more. The database for this program resides on our company in house server.
They have now asked me to port this program to their mobile phones which I am trying to do with B4A.
However, in the literature I have not found any reference to a way I can have a single database hosted on the internet somewhere and use it for the Diary App.
Even the book B4A: Rapid Android App Development Using Basic only shows handling databases residing on the phone.
Am I missing something? Is there not a cloud service somewhere, where I can host the Access or other database and how would I read from it to produce lists or messages on the cell phone.
Thanks
PK
 

Peekay

Active Member
Licensed User
Longtime User
Thanks Jimmy,
I have seen that and what I gathered is that I must download jRDC2 which I thought was a .jar library, but I find it not to be - so, how do I address the library issue for dbRequestManager.
 
Upvote 0

DonManfred

Expert
Licensed User
Longtime User
Search for jRDC2. This is the newest RDC available and probably the best way to connect to a Remote-Database.
 
Upvote 0

KMatle

Expert
Licensed User
Longtime User
I have not found any reference to a way I can have a single database hosted on the internet somewhere

With B4x you can use every db on every platform. It's more about how to access it. There are several options:

- jRDC
- via own php over OkHttpUtils
- via other webservices via OKHttpUtils (like aspx, soap, etc.)
- ...

My prefered solution is using B4x with php & MySQL. See my, DonManfreds or other helpful discussions/examples here.
 
Upvote 0

Peekay

Active Member
Licensed User
Longtime User
KMatle,
Very new to PHP - if you can elucidate please:

When I send a webserver Post, I presume I need a web script 'page' called DB1.PHP for example. If I send twenty queries to my MySQL database, do I have to have 20 different script files on the website?
Is there a certain structure that the .PHP file must have?

Thanks
PK
 
Upvote 0

tigrot

Well-Known Member
Licensed User
Longtime User
I recommend you to use jRDC2. It is simpler and more powerful (and more secure if you are not familiar with PHP). The only reason to use PHP is if you are using a shared hosting.
I agree: I have some shared host with PHP script. For a very small fee they allow to access a very powerful DB server(MSsql o Mysql). In many cases they can handle more than 6.000 transaction/hour. But if you hire a virtual server on cloud you can get a full system at a little higher cost, to use jRDC2 and DB server as well.
 
Upvote 0

sorex

Expert
Licensed User
Longtime User
Upvote 0

Peekay

Active Member
Licensed User
Longtime User
Is it not possible to use MS Access in the Cloud and access it directly like in a mapped drive on your phone with B4A or on my PC, if I have a Virtual Private server?
My problem is that I need to synchronize my Diary program on the PC which uses Access with the Diary Mobile program on the phone which uses MySQL. Too many things to sort out for a novice like me.
I am not even sure whether I can use PHP or jRDC2 on my PC with VB6.
 
Upvote 0

Erel

B4X founder
Staff member
Licensed User
Longtime User
You will not be able to use jRDC2 with VB6.
You cannot access a network drive as if it was local drive.
It is possible to use MS Access with jRDC2. However I don't think that it is a good idea to access it from two different processes. It will get corrupted.

In the long run, the correct solution is to use a real database and not MS Access.
 
Upvote 0

Peekay

Active Member
Licensed User
Longtime User
Thanks Erel. The jRDC2 which I have downloaded is written in Java. (jRDC.B4J). How do I get to make a library from it if I can only compile from B4A?
 
Upvote 0

sorex

Expert
Licensed User
Longtime User
you can always install IIS on your pc and portforward to it on your router/firewall.

asp can handle multiple connection to your access file for sure. not 100% sure about PHP.
but it will choque when you are editing table structures due to a forced lock.

going the mssql/mysql way is the correct method.
 
Upvote 0

Peekay

Active Member
Licensed User
Longtime User
DonManfred, please say it in a way that I can understand. I do not have B4J and I am sure someone who has already compiled it might make a zip file available. Or what do I not understand?
 
Upvote 0
Top