Ò׽ؽØÍ¼Èí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö160KB

´¿JSP·ÖÒ³´úÂëÖ®sqlserver2005/2008

ÉÏһƪ·ÖÒ³ÎÄÕ£¬ÊÇÓÃÓÚmysql£¬ÉÔ΢ÐÞ¸ÄÏ£¬ÓÃÓÚSqlserver2005/2008£¬Ã»ÓÐÒì³£´¦Àí¡£Ã»Óп¼ÂÇÐÔÄܵȡ£
ÏÖ½«´úÂëÌù³ö£¬ÒÔ¹©³õѧÕ߲ο¼£º
×¢£ºÑûÔÂʹÓû·¾³Eclipse 3.4.2+Tomcat 6.18+Sqlserver2005 sp3µ÷ÊԳɹ¦¡£
Ò³ÃæpagelistDemo.jspÄÚÈÝ£º
Code
<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%
    //Á¬½Ó×Ö·û´®
    String url = "jdbc:sqlserver://" + Globals.Server
            + ";databaseName=" + Globals.DbName;
    Class.forName(Globals.driverName).newInstance();
    Connection connection = DriverManager.getConnection(url,
            Globals.username, Globals.pwd);
    Statement statement = connection.createStatement();
    //ÿҳÏÔʾ¼Ç¼Êý
    int PageSize = 10;
    int StartRow = 0; //¿ªÊ¼ÏÔʾ¼Ç¼µÄ±àºÅ
    int PageNo = 0;//ÐèÒªÏÔʾµÄÒ³Êý
    int CounterStart = 0;//ÿҳҳÂëµÄ³õʼֵ
    int CounterEnd = 0;//ÏÔʾҳÂëµÄ×î´óÖµ
    int RecordCount = 0;//×ܼǼÊý;
    int MaxPage = 0;//×ÜÒ³Êý
    int PrevStart = 0;//ǰһҳ
    int NextPage = 0;//ÏÂÒ»Ò³
    int LastRec = 0;
    int LastStartRecord = 0;//×îºóÒ»Ò³¿ªÊ¼ÏÔʾ¼Ç¼µÄ±àºÅ
    //»ñÈ¡ÐèÒªÏÔʾµÄÒ³Êý£¬ÓÉÓû§Ìá½»
    if (request.getParameter("PageNo") == null) {&n


Ïà¹ØÎĵµ£º

sqlserver ÖÐÌá¸ß²éѯÐÔÄܵķ½·¨

MS   SQL   Server²éѯÓÅ»¯·½·¨
²éѯËÙ¶ÈÂýµÄÔ­ÒòºÜ¶à£¬³£¼ûÈçϼ¸ÖÖ 
        1¡¢Ã»ÓÐË÷Òý»òÕßûÓÐÓõ½Ë÷Òý(ÕâÊDzéѯÂý×î³£¼ûµÄÎÊÌ⣬ÊdzÌÐòÉè¼ÆµÄȱÏÝ) 
        2¡¢I/OÍÌÍÂÁ¿Ð¡£¬ÐγÉÁËÆ¿¾±Ð§Ó¦¡£ 
& ......

htmlÓëjspǶÌ×Ò»¸öÎÊÌ⣨±¸Íü£©


  <%
     int a =1;
     out.println("<input type='checkbox' value='"+a+"'>");
   
     %>
     
     <%int b =1 ;%>
     <i ......

Tomcat 6 + JDK1.6u2 ÅäÖÃjsp, servlet, beanʵ¼ù


Ò»¡¢ÎļþÏÂÔØ¼°°æ±¾
apache-tomcat-6.0.20.exe
jdk-6u2-windows-i586-p.exe
¶þ¡¢°²×°¼°»·¾³±äÁ¿ÉèÖÃ
Èí¼þ°²×°ºó£¬ÐèÒªÅäÖû·¾³±äÁ¿¡£Ð½¨JAVA_HOME, CATALINA_HOME, classpath,ÐÞ¸Äpath£º
classpath = ".;%JAVA_HOME%\lib\dt.jar;%JAVA_HOME%\lib\tools.jar;%CATALINA_HOME%\lib\servlet-api.jar"
path += ";%JAVA_ ......

SQLSERVERÊý¾Ý¿â»¹Ô­ÊµÕ½

1£©Ð½¨Êý¾Ý¿âRESTORE
2£©ÔÚ¸ÃÊý¾Ý¿âÉÏÑ¡Ôñ£ºÈÎÎñ->»¹Ô­->Êý¾Ý¿â
3£©ÔÚ»¹Ô­Êý¾Ý¿â-RESTOREµÄ¶Ô»°¿òÖÐ
   Ä¿±êÊý¾Ý¿âÊÇRESTORE
   Ö¸¶¨ÓÃÓÚ»¹Ô­µÄ±¸·Ý¼¯µÄÔ´ºÍλÖÃ->Ô´É豸->Ñ¡Ôñ×îºóÒ»¸öÍêÈ«µÄ±¸·ÝBAKÎļþ
   ¹´Öл¹Ô­CheckBox
4£©Ñ¡Ôñ×óÉϽǵÄÑ¡Ïî
   ÔÚ»¹Ô­Ñ ......

sqlserver°²×°ºÍ¿ò¼Ü

ÎÒÃÇ×ÜÊǰÑSQL Server Õâ¸öµ¥´Ê¹ÒÔÚ×ì±ß£¬Ò²ÐíºÜÉÙÓÐÈË˼¿¼¹ý SQL Server µ½µ×ÊÇʲô¶«Î÷¡£Õâ¸öÎÊÌâºÜÄÑÓü¸¾ä»°½²Çå³þ¡£ÎÒÃÇÖ®ËùÒÔÒªÓÃÁ¬Ôصķ½Ê½ÌÖÂÛ SQL Server£¬¾ÍÊÇÒª´Ó²»Í¬µÄ½Ç¶È²ûÊöÕâ¸öÎÊÌâ¡£
¡¡¡¡Ò»¡¢·þÎñÆ÷×é¼þ
¡¡¡¡SQL Server 2000ÓÉÁ½¸ö²¿·Ö×é³É£º·þÎñÆ÷×é¼þºÍ¿Í»§¶Ë¹¤¾ß¡£
¡¡¡¡1.ÄÚÈÝ
¡¡¡¡SQL ServerµÄ·þ ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØÍ¼ | ¸ÓICP±¸09004571ºÅ