import java.util.Properties;
import java.sql.*;public class con
{
public static void main(String args[])
{
String driverName = "sum.jdbc.odbc.JdbcOdbcDriver"
String sourceURL = "jdbc:odbc:ASA 6.0 Sample"
try
{
Class.forName(driverName);
Properties prop = new Properties();
prop.setProperty("user","dba");
prop.setProperty("password","sql");
Connection databaseConnection = DriverManager.getConnection(sourceURL,prop);
}
catch(ClassNotFoundException cnfe)
{
System.err.println("Error loading"+driverName);
}
catch(SQLException sqle)
{
System.err.println(sqle);
}
}
}
要記得給分。
import java.sql.*;public class con
{
public static void main(String args[])
{
String driverName = "sum.jdbc.odbc.JdbcOdbcDriver"
String sourceURL = "jdbc:odbc:ASA 6.0 Sample"
try
{
Class.forName(driverName);
Properties prop = new Properties();
prop.setProperty("user","dba");
prop.setProperty("password","sql");
Connection databaseConnection = DriverManager.getConnection(sourceURL,prop);
}
catch(ClassNotFoundException cnfe)
{
System.err.println("Error loading"+driverName);
}
catch(SQLException sqle)
{
System.err.println(sqle);
}
}
}
要記得給分。
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货