Android Tutorial Tutorial of connecting Android to MS SQL Server using jRDC2

pengbm

Member
Licensed User
Longtime User
Where's your MS SQL database? In another computer in your network? In the same computer you're developing? In internet?
Hello, I would like to know if I rent a cloud database, shall I change the part of localhost to the external IP address of the cloud database: port? However, when I run the url < cloud database IP address >:17178/test, the browser always prompts me to time out……
 

josejad

Expert
Licensed User
Longtime User
Hello, I would like to know
Hi:

You should create a new thread for your question.

if I rent a cloud database
jRDC2 needs to be run on a VPS (virtual server). If you run in the same server as your database (faster and more secure), then config.properties must point to localserver. If they are in differents servers (jRDC2 in server A and database in server B) then it has to point the the external ip of the database.
Your database server must have opened the ports to access to database, so you should probably take additional security measures, like such as restricting port access to the ip of the jRDC2 server)
 

pengbm

Member
Licensed User
Longtime User
 

pengbm

Member
Licensed User
Longtime User
Thanks for your reply. They are indeed in different servers, and I also pointed to the external IP of the database, the port of the database should be open, because I can connect to my cloud database using Navicat, but I can't connect to my cloud database using JRDC, I don't know what the problem is.

So I want to ask you if my format is correct:

http://XXX (database external IP) : 17178 (this Java server port number does not change?) /test
 

Bladimir Silva Toro

Active Member
Licensed User
Longtime User
Hello @pengbm

jRDC2 is a millware that runs on Java.

So to make it work there are several possibilities which are:

1. Local Service: Both your database and jRDC2 run locally on your PC or on your LAN or WIFI network. It is possible to convert your PC or your local server into a remote one, for that you must ask your ISP (Internet Service Provider) for a public internet IP.

2. Remote Service: You can have jRDC2 and your database running on a VPS service, there are several that I like such as DigitalOcean, Google Cloud and VPS Mart.

Remember that in a VPS service they give you a virtual server with only the operating system in linux or Windows, you must install everything else, that is, the database, the JRE, the FTP and run jRDC2.

Shared hosting services like Hostinger, GoDaddy, Hostgator, Wix and others are NOT working as it cannot run Java applications like jRDC2

My recommendation and surely that of many colleagues is that you use jRDC2 in a VPS service, I personally recommend DigitalOcean since you can start from 5 dollars a month. https://www.digitalocean.com/

If you have a shared hosting I recommend that you make your own WebServices and consume it in B4A.

Any other questions will be gladly answered
 
Last edited:

Shelby

Well-Known Member
Licensed User
This is a very old thread and topic. I think you better start a new thread/question series.
 

amarnath

Member
Licensed User
Longtime User
I tried a lot but I can't get it. I want to connect in b4a. I have OviPanel. In that I have to connect to Mysql database. Can anyone help me?
 

josejad

Expert
Licensed User
Longtime User
I have OviPanel. In that I have to connect to Mysql database
Please, start a new thread, you're asking in a thread about how to connect to MS SQL, but you want to know about Mysql. We don't know what's OviPanel, but it seems to be a control panel, so you can't use a jRDC2 server.

So, start a new thread, explain us how are you trying to connect to your database, where is it hosted, etc...
If you don't have ssh access to your server, you probably have to access using PHP (or another server side languaje) or JdbcSQL
 
Last edited:
Cookies are required to use this site. You must accept them to continue using the site. Learn more…