Hi,

As you mentioned, if the DB exists in the remote server, You need to get the Correct IP where the correct DB exists and then U need to connect like the code below.

Connection con = null;...