Android Question mysql connection

gpbimal

Member
Dear Developers

I want to connect a remote database (mysql) with b4a application. I'm basic in B4A because I'm a VB Developer.

I've read
jRDC2 - Connect to remote databases from B4A example sites, view in YouTube and follow the given instruction.

But I unable to connect my database.

I just want b4a code for:
1. Successful connection code for my various remote database.
2. Get data and bind in ListView one by one.

3. Run an Insert query.

That's all

I can pay $30-40 for this. Please help...
 

Erel

B4X founder
Staff member
Licensed User
Longtime User
Upvote 0

gpbimal

Member

Thank you very much for your valuable suggestion. I'll follow the instructions.
 
Upvote 0

OliverA

Expert
Licensed User
Longtime User
Was this ever resolved? This had nothing to do with database connectivity. @Erel is correct. You missed a step when you created your B4A application. Both DBCommand and DBRequest Types have to be declared in Proccess_Globals of your Main activity! Not in any other activty/class/service module. The interesting part is that the server showed the correct error message
(ClassNotFoundException) java.lang.ClassNotFoundException: b4j.example.test$_dbcommand
But the initial screenshot of you B4A app showed a null pointer exception. Don't know if this is because of B4A, because in B4J, the exception reported is the same
 
Upvote 0

gpbimal

Member
Thanks a lot all of you! connection is made successfully. I'm loving it....
@Erel yes I missed a step, thank you once again to correct me...
Local connection has made, now trying with web server. I hope I can do this.
And trying to binding data with spinner, listview or labels etc.

I want to try it with my best efforts, Thanks
 
Upvote 0

gpbimal

Member
Hi!
I've connected with local-host mysql database as well. I've changed the server IPAddress in config.properties file and run the B4J in release mode. A jRDC.jar file is created. I've no idea how to run that jRDC.jar file in server (to use it as middle ware) to connect online database with client application. Please help...
 
Upvote 0

Bladimir Silva Toro

Active Member
Licensed User
Longtime User
Hi @gpbimal

You can do it in 2 ways:

1. Request a public IP from your internet provider (ISP) so that your computer can be accessed online from anywhere in the world

2. Rent a Web server that can be managed are called VPS services.

Windows Link: https://www.vps-mart.com/Windows-VPS
Linux Link: https://www.vps-mart.com/Linux-VPS

Here I leave you the code of the BAT file that I execute when the computer starts up.

B4X:
@echo off

java -jar "D:\jRDC.jar"

pause
exit
 
Upvote 0
Cookies are required to use this site. You must accept them to continue using the site. Learn more…