使用热区和切割(Hotspots and Slices)
使用热区和切割(Hotspots and Slices)(上)
使用热区和切割(Hotspots and Slices)
使用热区和切割(Hotspots and Slices)(上)
Photoshop中3D logo的制作技巧
Photoshop中的完美混和
在Photoshop中轻松调整图像选区
SHIFT键在PHOTOSHOP中的应用
由于系统需求,最近在开发过程中将系统从原来的MySQL转移到SQL 2000下,其中遇到了诸多问题,花费了我不少时间。现在把我的经验拿出来告诉大家,好让大家少走弯路,节约时间。
/*********************************************** /* /*DBTest.java /* /******************************************* */ import java.sql.*; public class DBTest { Connection con; Statement sta; ResultSet rs; String driver; String url; String user; String pwd; public DBTest() { driver = "com.microsoft.jdbc. sqlserver.SQLServerDriver";; url = "jdbc:microsoft:sqlserver: //localhost:1433;DatabaseName =test"; //test为数据库名 user = "sa"; pwd = "sa"; //请更改为你相应的用户和密码 init(); } public void init() { try{ Class.forName(driver); System.out.println("driver is ok"); con = DriverManager. getConnection(url,user,pwd); System.out.println("conection is ok"); sta = con.createStatement(); rs = sta.executeQuery ("select * from room"); while(rs.next()) System.out.println (rs.getInt("roomNum")); }catch(Exception e) { e.printStackTrace(); } } public static void main(String args[]) //自己替换[] { new DBTest(); } }
driver is ok java.sql.SQLException: [Microsoft] [SQLServer 2000 Driver for JDBC] Error establis hing socket. at com.microsoft.jdbc.base. BaseExceptions.createException(Unknown Source ) at com.microsoft.jdbc.base. BaseExceptions.getException(Unknown Source) at com.microsoft.jdbc.base. BaseExceptions.getException(Unknown Source) at com.microsoft.jdbc.sqlserver.tds. TDSConnection.<init>(Unknown Source) at com.microsoft.jdbc.sqlserver. SQLServerImplConnection.open(Unknown Sou rce) at com.microsoft.jdbc.base. BaseConnection.getNewImplConnection(Unknown S ource) at com.microsoft.jdbc.base. BaseConnection.open(Unknown Source) at com.microsoft.jdbc.base. BaseDriver.connect(Unknown Source) at java.sql.DriverManager. getConnection(DriverManager.java:523) at java.sql.DriverManager. getConnection(DriverManager.java:171) at DbTest.init(DbTest.java:32) at DbTest.<init>(DbTest.java:25) at DbTest.main(DbTest.java:46) Press any key to continue...
driver is ok conection is ok java.sql.SQLException: [Microsoft][SQLServer 2000 Driver for JDBC] [SQLServer]对 象名 'room' 无效。 at com.microsoft.jdbc.base. BaseExceptions.createException(Unknown Source ) at com.microsoft.jdbc.base. BaseExceptions.getException(Unknown Source) at com.microsoft.jdbc.sqlserver.tds. TDSRequest.processErrorToken(Unknown Source) at com.microsoft.jdbc.sqlserver.tds. TDSRequest.processReplyToken(Unknown Source) at com.microsoft.jdbc.sqlserver.tds. TDSExecuteRequest.processReplyToken( Unknown Source) at com.microsoft.jdbc.sqlserver.tds. TDSRequest.processReply(Unknown Sour ce) at com.microsoft.jdbc.sqlserver. SQLServerImplStatement.getNextResultType (Unknown Source) at com.microsoft.jdbc.base. BaseStatement.commonTransitionToState (Unknown Source) at com.microsoft.jdbc.base. BaseStatement.postImplExecu te(Unknown Source) at com.microsoft.jdbc.base. BaseStatement.commonExecute(Unknown Source) at com.microsoft.jdbc.base. BaseStatement.executeQueryInternal (Unknown So urce) at com.microsoft.jdbc.base. BaseStatement.executeQuery(Unknown Source) at DbTest.init(DbTest.java:35) at DbTest.<init>(DbTest.java:25) at DbTest.main(DbTest.java:46) Press any key to continue...
driver is ok conection is ok 1001 1002 1003 1004 1005 1006 Press any key to continue...
| 网友评论:(只显示最新10条。评论内容只代表网友观点,与本站立场无关!) |