javaÁ¬½Ósqlserver2005Êý¾Ý¿âÐĵÃÌå»á
sqlserverÊý¾Ý¿â£ºjavaÁ¬½Ósqlserver2005Êý¾Ý¿âÐĵÃÌå»á
Ê×ÏȵÃÏÂÔØÇý¶¯³ÌÐòµ½Î¢ÈíÍøÕ¾ÏÂÔØMicrosoft SQL Server 2005 JDBC Driver 1.2¡¡¡¡½âѹMicrosoft SQL Server 2005 jdbc driver1.2.exe
µÃµ½sqljdbc.jar£¬ÓõÃʱºòÖ±½Ó¼Óµ½classpathÖÐÈ¥.
¡¡ÉèÖÃSQL Server·þÎñÆ÷
·ÀÖ¹³öÏÖ
com.microsoft.sqlserver.jdbc.SQLServerException: µ½Ö÷»ú µÄ TCP/IP Á¬½Óʧ°Ü¡£ java.net.ConnectException: Connection refused: connect
at com.microsoft.sqlserver.jdbc.SQLServerException.makefromDriverError(Unknown Source)
at com.microsoft.sqlserver.jdbc.SQLServerConnection.connectHelper(Unknown Source)
at com.microsoft.sqlserver.jdbc.SQLServerConnection.loginWithoutFailover(Unknown Source)
at com.microsoft.sqlserver.jdbc.SQLServerConnection.connect(Unknown Source)
at com.microsoft.sqlserver.jdbc.SQLServerDriver.connect(Unknown Source)
at java.sql.DriverManager.getConnection(Unknown Source)
at java.sql.DriverManager.getConnection(Unknown Source)
at Dao.GetConnection.getCon(GetConnection.java:11)
at Dao.GetNotes.getAllNotes(GetNotes.java:13)
at Servlets.GetFull.doGet(GetFull.java:49)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:690)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
ÎÒʹÓõÄÊÇSQL Server 2005±ê×¼°æSP2£¬ÕâЩ¶¼Ä¬Èϼ´¿É£¬Ò»°ã²»ÓÃÅäÖá£Èç¹ûÐèÒªÅäÖö˿ÚÇë¿´ÏÂÃæ¡£
¡¡¡¡1¡¢“¿ªÊ¼”→“³ÌÐò&rdqu
Ïà¹ØÎĵµ£º
ListµÄÓ÷¨
List°üÀ¨List½Ó¿ÚÒÔ¼°List½Ó¿ÚµÄËùÓÐʵÏÖÀà¡£ÒòΪList½Ó¿ÚʵÏÖÁËCollection½Ó¿Ú£¬ËùÒÔList½Ó¿ÚÓµÓÐCollection½Ó¿ÚÌṩµÄËùÓг£Ó÷½·¨£¬ÓÖÒòΪListÊÇÁбíÀàÐÍ£¬ËùÒÔList½Ó¿Ú»¹ÌṩÁËһЩÊʺÏÓÚ×ÔÉíµÄ³£Ó÷½·¨£¬Èç±í1Ëùʾ¡£
±í1 List½Ó¿Ú¶¨ÒåµÄ³£Ó÷½·¨¼°¹¦ÄÜ
´Ó±í1¿ÉÒÔ¿´³ö£¬List½Ó¿ÚÌṩµÄÊʺÏÓÚ×ÔÉíµÄ ......
JavaÈÝÆ÷Àà¿âÖ÷Òª°üº¬Á½ÖÖÀàÐÍCollection(List,Set,Queue)ºÍMap£¬ËüÃǵÄÇø±ðÔÚÓÚÿ¸ö²Û±£´æµÄÔªËظöÊý£¬CollectionÖ»±£´æÒ»¸ö£¬¶øMap±£´æ¼üºÍÖµ¡£
1.µ±Ê¹ÓÃArrays.asList()ʱ£¬Ëü»áÔÚʹÓÃÒ»¸öfinalµÄÊý×é×÷Ϊµ×²ãʵÏÖ£¬Òò´ËÈκÎÉè¼Æµ½¸ü¸ÄÆ䳤¶È´óСµÄ²Ù×÷¶¼½«Å×UnsuportedExceptioÒì³£¡£
2.finalµÄÊý×飬²»Äܸıä´óС£¬µ ......
package com.ftp;
import com.enterprisedt.net.ftp.FTPClient;
import com.enterprisedt.net.ftp.FTPFile;
import com.enterprisedt.net.ftp.FTPMessageCollector;
import com.enterprisedt.net.ftp.FTPTransferType;
import com.enterprisedt.net.ftp.FTPConnectMode;
import com.enterprisedt.util.debug.Level;
......
ÓÃjavaµ÷ÓÃoracle´æ´¢¹ý³Ì×ܽá
1¡¢Ê²Ã´ÊÇ´æ´¢¹ý³Ì¡£´æ´¢¹ý³ÌÊÇÊý¾Ý¿â·þÎñÆ÷¶ËµÄÒ»¶Î³ÌÐò£¬ËüÓÐÁ½ÖÖÀàÐÍ¡£Ò»ÖÖÀàËÆÓÚSELECT²éѯ£¬ÓÃÓÚ¼ìË÷Êý¾Ý£¬¼ìË÷µ½µÄÊý¾ÝÄܹ»ÒÔÊý¾Ý¼¯µÄÐÎʽ·µ»Ø¸ø¿Í»§¡£ÁíÒ»ÖÖÀàËÆÓÚINSERT»òDELETE²éѯ£¬Ëü²»·µ»ØÊý¾Ý£¬Ö»ÊÇÖ´ÐÐÒ»¸ö¶¯×÷¡£ÓеķþÎñÆ÷ÔÊÐíͬһ¸ö´æ´¢¹ý³Ì¼È¿ÉÒÔ·µ»ØÊý¾ÝÓÖ¿ÉÒÔÖ´Ðж¯×÷¡£
......