Android Question MSSQL RDC Connection settings

jkhazraji

Active Member
Licensed User
Longtime User
if you have a SQL database residing on a remote website (NOT local) and you have the MS SQL Server address= 'dbService.mssql.site.com' and user name ='defaultuser' and password='Anypass' what will be the lines in config.properties file to achieve an RDC connection through 'RunRLC.bat' to run the server. I do not want the server to run on a local machine since my database is remote and opening the server port is a heck of problem.
My confusion is really that: If I want my android app to connect to a remote database why would I use a database that resides on a PC. How would the app find the address?
 

jkhazraji

Active Member
Licensed User
Longtime User
Can this be correct in config.properties file:

#Lines starting with '#' are comments.
#Backslash character at the end of line means that the command continues in the next line.


#SQL Server
DriverClass=net.sourceforge.jtds.jdbc.Driver
JdbcUrl=jdbc:jtds:sqlserver:// dbService.mssql.site.com /dbService
User=defaultuser
Password=AnyPass
ServerPort=????
#If Debug is true then this file will be reloaded on every query.
#This is useful if you need to modify the queries.
Debug=true

#commands
sql..................
sql.................
sql.select_...=SELECT ... ... FROM .... WHERE ... = ?
 
Upvote 0

jkhazraji

Active Member
Licensed User
Longtime User
Hi,
Yes I can ping it and I can make connection to the remote database site by using ASP.NET but as I want to make the server with the same parameters I fail and the server does not work. Is it necessary to detect a port number because I do not know it for the ms sql server I use.
 
Upvote 0

jkhazraji

Active Member
Licensed User
Longtime User
I don’t understand what you mean. You need a machine to run a database server.
I know that sir but how would I achieve that server in the correct way in order connect to the remote SQL server with the above parameters (What is wrong with them)?
 
Upvote 0

aeric

Expert
Licensed User
Longtime User
Does the server opens the remote port?? since I opened it in the firewall and Antivirus packet rules but to no avail
You can use any unused port number as long as it is not reserved. Normally I use a number bigger than 5000. This port number is for java server.
As I mentioned above, I gave a number 17178 as the ServerPort value. Of course you need to allow this port in firewall.

For mssql database server, if you never change the default value, you can ignore the number. The default port number is 1433.
 
Upvote 0

jkhazraji

Active Member
Licensed User
Longtime User
Using the ip in the config.properties, the server on the command window is working but I can not connect to it in the browser with the 'site can't be reached' and 'took too long to repond' message popping?
 
Upvote 0

jkhazraji

Active Member
Licensed User
Longtime User
Did you download the database driver and put into the jdbc_driver folder?
Yes.
1616171868337.png
 

Attachments

  • 1616171841953.png
    1616171841953.png
    8.5 KB · Views: 175
Upvote 0

jkhazraji

Active Member
Licensed User
Longtime User
I tested the whole setting on local mysql database and it worked but for a remote ms sql database it seems something more complicated
 
Upvote 0
Top