public static String getURLByDBInfo(DBInfo dbInfo)
{
String url = "";
if(dbInfo.getDbType() != null)
if(dbInfo.getDbType().equals("SQLSERVER"))
url = (new StringBuilder("jdbc:microsoft:sqlserver://")).append(dbInfo.getDbHost()).append(":").append(dbInfo.getDbPort()).append(";DatabaseName=").append(dbInfo.getDbSID()).toString();
else
if(dbInfo.getDbType().equals("ORACLE"))
url = (new StringBuilder("jdbc:oracle:thin:@")).append(dbInfo.getDbHost()).append(":").append(dbInfo.getDbPort()).append(":").append(dbInfo.getDbSID()).toString();
else
if(dbInfo.getDbType().equals("ORACLE_DSP"))
url = (new StringBuilder("jdbc:dsp@")).append(dbInfo.getDbHost()).append(":").append(dbInfo.getDbPort()).append("/").append(dbInfo.getDbSID()).append("/").append(dbInfo.getNamespace()).toString();
else
if(dbInfo.getDbType().equals("SYBASE"))
url = "jdbc:sybase:Tds:...";
else
url = "sun.jdbc.odbc.JdbcOdbcDriver";
return url;
}