在一个程序中实现从一个数据库中取数,并将其放入另一个数据库中,可以吗?如何实现?请指教
可以呀!
String url="jdbc:microsoft:sqlserver://localhost:1433;DatabaseName=test";
//test为你的数据库的
String user="sa";
String password="";
Connection conn= DriverManager.getConnection(url,user,password);
url="jdbc:microsoft:sqlserver://localhost:1433;DatabaseName=test";
//test为你的数据库的
user="sa";
password="";
Connection2 conn= DriverManager.getConnection(url,user,password);
of course !use two transobjects