DMS: Get connection via Java API without use file mobileserverid.dat ?
Hi all,
I am looking how to create a connection code to Mobile server without use file mobileserverid.dat ?
E,g i have this code into my java API application
==============
private static Connection getConnection(String user ,String password)
{
Connection conn =null;
try
{
DriverManager.registerDriver((Driver)(Class.forName("oracle.jdbc.driver.OracleDriver").newInstance()));
}
catch(Exception e)
{
e.printStackTrace();
}
try
{
conn=null;
String jdbc_url = "jdbc:oracle:thin:@ + hostName + :" + DBPort + ":" + SID;
conn = DriverManager.getConnection(jdbc_url,user,password);
}
catch(Exception e)
{
e.printStackTrace();
}
return conn;
}
}
;
======================
It works fine from Mobile Server or SDK system , but from a clean PC you have this error :