Android Question Who has a case study of SQLserver connection?

bskotu555

Member
I have a cloud server with SQLserver database installed on it, and I want to connect to the database for adding, deleting, modifying, and querying purposes. As a beginner, I need to learn from the case study. Thank you
 

Lucas Siqueira

Active Member
Licensed User
Longtime User
use jdbc https://www.b4x.com/android/forum/t...ly-connect-to-remote-databases.84016/#content

download in drives:
MySQL: https://dev.mysql.com/doc/connector-j/5.1/en/connector-j-reference-using-ssl.html
PostgeSQL: https://www.postgresql.org/docs/current/static/ssl-tcp.html
MSSQL: https://docs.microsoft.com/en-us/sql/connect/jdbc/using-ssl-encryption




but I wouldn't use jdbc, I would create an api using some tool that I know like PHP, B4J or node.js to create a REST API, with that my app, both android and ios and java, could consume the data via http (GET, POST, PUT, PATCH)
 
Last edited:
Upvote 0

Erel

B4X founder
Staff member
Licensed User
Longtime User
Upvote 0

amorosik

Expert
Licensed User
I have a cloud server with SQLserver database installed on it, and I want to connect to the database for adding, deleting, modifying, and querying purposes. As a beginner, I need to learn from the case study. Thank you

But do you mean to query the db directly from the outside (and therefore the provider should allow access on a certain address/port), or can you install something on the db server side?
And if you could do it, what programming environment are you allowed to use?
Usually there is always a php interpreter available, but it would be interesting to understand if you can install some of your own programs or not
 
Upvote 0

bskotu555

Member
But do you mean to query the db directly from the outside (and therefore the provider should allow access on a certain address/port), or can you install something on the db server side?
And if you could do it, what programming environment are you allowed to use?
Usually there is always a php interpreter available, but it would be interesting to understand if you can install some of your own programs or not
I installed MySQL database on Tencent Cloud server, opened port 3306, set the command to allow remote access, and created a data table in the database. This way, I can remotely access the database using an online app and perform operations such as adding and deleting data
 
Upvote 0

udg

Expert
Licensed User
Longtime User
Beware that disassembling your app, anyone will have the credentials and the ip/server to connect to your db. That means the same level of access of yours.
 
Upvote 0

josejad

Expert
Licensed User
Longtime User
I installed MySQL database on Tencent Cloud server

opened port 3306
Close it, it's not secure. Or at least restrict its use to a single IP address with the firewall, in order to be able to do maintenance work with HeidiSQL or similar.
 
Upvote 0

bskotu555

Member
Beware that disassembling your app, anyone will have the credentials and the ip/server to connect to your db. That means the same level of access of yours.
Yes, data security is very important. The APP will eventually run within the local area network, and security will be guaranteed.
 
Upvote 0

bskotu555

Member


Close it, it's not secure. Or at least restrict its use to a single IP address with the firewall, in order to be able to do maintenance work with HeidiSQL or similar.
Okay, we will set up the firewall today
 
Upvote 0
Top