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

JSPÖÐÁ¬½ÓSQL 2000Êý¾Ý¿âµÄÎÊÌâ×ܽá

 
ÓÉÓÚϵͳÐèÇó£¬×î½üÔÚ¿ª·¢¹ý³ÌÖн«ÏµÍ³´ÓÔ­À´µÄMySQLתÒƵ½SQL
2000Ï£¬ÆäÖÐÓöµ½ÁËÖî¶àÎÊÌ⣬»¨·ÑÁËÎÒ²»ÉÙʱ¼ä¡£ÏÖÔÚ°ÑÎҵľ­ÑéÄóöÀ´¸æËß´ó¼Ò£¬ºÃÈôó¼ÒÉÙ×ßÍä·£¬½ÚԼʱ¼ä¡£
¡¡¡¡Ê×ÏÈÊÇSQL
2000Êý¾Ý¿âµÄ°²×°ÎÊÌ⣬ÔÚ´ËÎÒÖ÷Òª½²Ð©¹ØÓÚSQL 2000µÄ°æ±¾Óë²Ù×÷ϵͳµÄ¼æÈÝÐÔÎÊÌ⣺SQL
2000×ܹ²ÓÐ7¸ö²»Í¬°æ±¾£¬ÊÊÓ¦²»Í¬µÈ¼¶Óû§µÄÐèÇó¡£
¡¡¡¡ÎÒÊÔÁËһϣ¬ÔÚXPϵͳÏÂÖ»ÓГ¸öÈË¿ª·¢°æ”ÄÜÕý³£°²×°¶ø²»³öÏÖ´íÎó£¬ËùÒÔ´ó¼ÒÔÚ°²×°Ê±Òª×¢Ò⣬¾ßÌ尲װʱµÄÅäÖòÎÕÕÏà¹Ø˵Ã÷¾Í¿ÉÒÔÁË¡£
¡¡¡¡ÏÂÃæ˵Ã÷ÈçºÎÁ¬½Óµ½SQL
2000Êý¾Ý¿â£¬Ê×Ïȵ±È»ÊÇÒªÏÂÔØJDBCÇý¶¯³ÌÐò£¬×îºÃȥ΢Èí¹Ù·½ÍøÕ¾ÏÂÔØ£¬È»ºó½«ÏÂÔص½µÄÈý¸öJAR°ü·ÅÈëÄãµÄWEBÓ¦ÓõÄWEB-INF/lib/Ï¡£½ÓÏÂÀ´±àд³ÌÐò½øÐвâÊÔ:
/***********************************************
/*
/*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();
}
}
¡¡¡¡°´µÀÀí½²£¬ÉϱßÕâ¶Î´úÂëÓ¦¸Ãû´í£¬¿ÉÊ×ÏÈÎÒÃÇÀ´¿´Ò»Ï£¬Èç¹ûsqlser·þÎñÆ÷ûÓÐÉý¼¶µ½sp3£¨ÔÚʹÓÃjdbcʱ£¬Èç¹ûϵͳÊÇxp»òÕß


Ïà¹ØÎĵµ£º

JSPÎļþÏÂÔØ

֮ǰ,д¹ýÒ»¸öDownload.jspÎļþ,Äܽâ¾öÏÂÔØÎļþÂÒÂëÎÊÌâ(ÖîÈç:DOC,XSLÎļþµÈµÈ).
ºóÀ´·¢ÏÖ,Óö¼ûÖÐÎÄÃûµÄÎļþµÄʱºò,ÎļþÏÂÔؽ«»á±¨´í~~~~
½ñÌì,ͨ¹ý¸ÄдԭDownload.jspÎļþÒÑÍêÈ«½â¾öÁËÕâ¸öÎÊÌâ~
Ä¿Ç°,°ÑÒ»ÕûÌ×µÄÎļþÉÏ´«ÏÂÔصķ½·¨¸øÌù³öÀ´~~~ÒÔ±ã´ó¼Ò½è¼ø!~!~!~!~! 
×÷Õß:¹Å°£¼°·¨ÀÏ
------------------------ ......

½â¾ö°²×°SQL Server2000 Îļþ¹ÒÆð

      1.²»ÓÃÍ˳öSQL2000°²×°³ÌÐò,Ö±½ÓÇл»µ½×ÀÃæ.
¡¡¡¡2.´ò¿ª×¢²á±í±à¼­Æ÷£¨ÔÚ“ÔËÐДÖÐÇÃÈë“regedit”Ö®ºó»Ø³µ¼´¿É£©£¬¶¨Î»µ½×¢²á±íµÄHKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager½Úµã.
¡¡¡¡3.µ¥»÷“Session Manager”Õâ¸ö½Úµã£¬ ......

SQL Server²é詢¿ÉÓôÅÅÌ¿Õ¼ä

--> Title  : SQL Server²é詢¿ÉÓôÅÅÌ¿Õ¼ä
--> Author : wufeng4552
--> Date   : 2009-10-30 09:59:09
Ç°ÑÔ
Èç¹ûÄãµÄ×éÖ¯ÓµÓеijÌÐòÒªÇóÒ»¸öºÜ´óÁ¿µÄ´ÅÅÌ¿Õ¼ä»òÕß´ó±ÈÀýµÄÌض¨´ÅÅÌ£¬ÄÇôȷ±£ÔÚ³ÌÐò¿ªÊ¼»òÕ߹ؼüµãʱȷÈÏ´ÅÅÌÇý¶¯Æ÷¾ßÓÐ×ã¹»µÄ´æ´¢¡£Ò»´Î¿ìËÙ¼ì²é¾Í¿ÉÒÔ½ÚÔ¼´óÁ¿µÄʱ¼ä£¬¼õ ......

SQL ServerÖлã×ܹ¦ÄܵÄʹÓÃGROUPING,ROLLUPºÍCUBE

1.Óà CUBE »ã×ÜÊý¾Ý
 CUBE ÔËËã·ûÉú³ÉµÄ½á¹û¼¯ÊǶàάÊý¾Ý¼¯¡£¶àάÊý¾Ý¼¯ÊÇÊÂʵÊý¾ÝµÄÀ©Õ¹£¬ÊÂʵÊý¾Ý¼´¼Ç¼¸ö±ðʼþµÄÊý¾Ý¡£À©Õ¹½¨Á¢ÔÚÓû§´òËã·ÖÎöµÄÁÐÉÏ¡£ÕâЩÁб»³ÆΪά¡£¶àάÊý¾Ý¼¯ÊÇÒ»¸ö½á¹û¼¯£¬ÆäÖаüº¬Á˸÷ά¶ÈµÄËùÓпÉÄÜ×éºÏµÄ½»²æ±í¸ñ¡£ CUBE ÔËËã·ûÔÚ SELECT Óï¾äµÄ GROUP BY ×Ó¾äÖÐÖ¸¶¨¡£¸ÃÓï¾äµÄÑ¡ÔñÁбíÓ ......

SQLÖÐDATEADDºÍDATEDIFFµÄÓ÷¨

¹Ì¶¨ÈÕÆÚ¼õÒ»¸öÔ£¨ÈÕ¡¢Ä꣩
dateadd(±í´ïʽ1£¬±í´ïʽ2£¬±í´ïʽ3£©
±í´ïʽ1ΪMM»òYY»òDD
±í´ïʽ2Ϊ1
±í´ïʽ3ΪҪ¼õµÄÈÕÆÚ Ò»¸öÔµĵÚÒ»Ìì µÚÒ»¸öÀý×Ó£¬ÎÒ½«¸æËßÄãÈçºÎ´Óµ±Ç°ÈÕÆÚÈ¥Õâ¸öÔµÄ×îºóÒ»Ìì¡£Çë×¢Ò⣺Õâ¸öÀý×ÓÒÔ¼°ÕâƪÎÄÕÂÖеÄÆäËûÀý×Ó¶¼½«Ö»Ê¹ÓÃDATEDIFFºÍDATEADDº¯ÊýÀ´¼ÆËãÎÒÃÇÏëÒªµÄÈÕ ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ