Android Question Connect b4a to phpMyadmin database on webhost.

wolfray1972

Member
Licensed User
Hello,

Connecting my phone to my database and search/display data from record. How do i do that.
I see several older posts about jRDC2, but i also see this is about data bases running on own pc. What should i do if my database runs on a webhost?

Hope you can help me!

Greetz Ray
 

barx

Well-Known Member
Licensed User
Longtime User
This was asked recently. You will probably find that the webhost won't let you connect directly to the DB. Some allow you to specify an IP to connect direct but no anonymous stuff. You will most likely need to create an CRUD API. And again, it is likely best in PHP
 
Upvote 0

wolfray1972

Member
Licensed User
Hello Barx,

Thank you for your reply, when in Visual studio i connect to my DB i use this:

VB:
Public Function Connect()
        MySqlcon = New MySqlConnection
        MySqlcon.ConnectionString = "Data Source=xxxxxxx;Port=3306;Database=xxxxxxxxxx;User ID=xxxx;Password=xxxxx;"
        MySqlcon.Open()
        Dim Query As String
        Query = "SELECT * FROM `xxxxx` WHERE 1"
        command = New MySqlCommand(Query, MySqlcon)

i can connect if i allow the IP on webhost.
I will check the CRUD API.

Thank you
 
Upvote 0

barx

Well-Known Member
Licensed User
Longtime User
Yes, like I said, if you allow the IP. Do you only need 1 (or a very limited of known) mobile device(s)?
If so, then try searching the forum for MySQL. The database type is MySQL. PHPMyAdmin is a front end that webhosts use to connect to MySQL database on local servers
 
Upvote 0

josejad

Expert
Licensed User
Longtime User
 
Upvote 0
Top