What is the correct method of connecting to a SQL Server database from Android using JDBC?
I am trying to connect to a SQL Server database from Android but cannot find any SQL Server examples. I found Jav_Rock's answer here for connecting to a MySQL database.
So I replaced his example getConnection() method with my own:
jdbc:sqlserver://xxxxxxxx.xxxx.xxxxx.xxxxxx:1433/dbname
However, I then get the error message:
com.microsoft.sqlserver.jdbc.SQLServerException: The port number 1433/dbname is not valid.
This suggests that the syntax does not support the database name included in the URL. Can anyone help me with the correct method of connecting to a SQL Server database via JDBC?