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»òÕß
Ïà¹ØÎĵµ£º
֮ǰ,д¹ýÒ»¸öDownload.jspÎļþ,Äܽâ¾öÏÂÔØÎļþÂÒÂëÎÊÌâ(ÖîÈç:DOC,XSLÎļþµÈµÈ).
ºóÀ´·¢ÏÖ,Óö¼ûÖÐÎÄÃûµÄÎļþµÄʱºò,ÎļþÏÂÔؽ«»á±¨´í~~~~
½ñÌì,ͨ¹ý¸ÄдÔDownload.jspÎļþÒÑÍêÈ«½â¾öÁËÕâ¸öÎÊÌâ~
Ä¿Ç°,°ÑÒ»ÕûÌ×µÄÎļþÉÏ´«ÏÂÔصķ½·¨¸øÌù³öÀ´~~~ÒÔ±ã´ó¼Ò½è¼ø!~!~!~!~!
×÷Õß:¹Å°£¼°·¨ÀÏ
------------------------ ......
1.²»ÓÃÍ˳öSQL2000°²×°³ÌÐò,Ö±½ÓÇл»µ½×ÀÃæ.
¡¡¡¡2.´ò¿ª×¢²á±í±à¼Æ÷£¨ÔÚ“ÔËÐДÖÐÇÃÈë“regedit”Ö®ºó»Ø³µ¼´¿É£©£¬¶¨Î»µ½×¢²á±íµÄHKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager½Úµã.
¡¡¡¡3.µ¥»÷“Session Manager”Õâ¸ö½Úµã£¬ ......
--> Title : SQL Server²é詢¿ÉÓôÅÅÌ¿Õ¼ä
--> Author : wufeng4552
--> Date : 2009-10-30 09:59:09
Ç°ÑÔ
Èç¹ûÄãµÄ×éÖ¯ÓµÓеijÌÐòÒªÇóÒ»¸öºÜ´óÁ¿µÄ´ÅÅÌ¿Õ¼ä»òÕß´ó±ÈÀýµÄÌض¨´ÅÅÌ£¬ÄÇôȷ±£ÔÚ³ÌÐò¿ªÊ¼»òÕ߹ؼüµãʱȷÈÏ´ÅÅÌÇý¶¯Æ÷¾ßÓÐ×ã¹»µÄ´æ´¢¡£Ò»´Î¿ìËÙ¼ì²é¾Í¿ÉÒÔ½ÚÔ¼´óÁ¿µÄʱ¼ä£¬¼õ ......
1.Óà CUBE »ã×ÜÊý¾Ý
CUBE ÔËËã·ûÉú³ÉµÄ½á¹û¼¯ÊǶàάÊý¾Ý¼¯¡£¶àάÊý¾Ý¼¯ÊÇÊÂʵÊý¾ÝµÄÀ©Õ¹£¬ÊÂʵÊý¾Ý¼´¼Ç¼¸ö±ðʼþµÄÊý¾Ý¡£À©Õ¹½¨Á¢ÔÚÓû§´òËã·ÖÎöµÄÁÐÉÏ¡£ÕâЩÁб»³ÆΪά¡£¶àάÊý¾Ý¼¯ÊÇÒ»¸ö½á¹û¼¯£¬ÆäÖаüº¬Á˸÷ά¶ÈµÄËùÓпÉÄÜ×éºÏµÄ½»²æ±í¸ñ¡£ CUBE ÔËËã·ûÔÚ SELECT Óï¾äµÄ GROUP BY ×Ó¾äÖÐÖ¸¶¨¡£¸ÃÓï¾äµÄÑ¡ÔñÁбíÓ ......
¹Ì¶¨ÈÕÆÚ¼õÒ»¸öÔ£¨ÈÕ¡¢Ä꣩
dateadd(±í´ïʽ1£¬±í´ïʽ2£¬±í´ïʽ3£©
±í´ïʽ1ΪMM»òYY»òDD
±í´ïʽ2Ϊ1
±í´ïʽ3ΪҪ¼õµÄÈÕÆÚ Ò»¸öÔµĵÚÒ»Ìì µÚÒ»¸öÀý×Ó£¬ÎÒ½«¸æËßÄãÈçºÎ´Óµ±Ç°ÈÕÆÚÈ¥Õâ¸öÔµÄ×îºóÒ»Ìì¡£Çë×¢Ò⣺Õâ¸öÀý×ÓÒÔ¼°ÕâƪÎÄÕÂÖеÄÆäËûÀý×Ó¶¼½«Ö»Ê¹ÓÃDATEDIFFºÍDATEADDº¯ÊýÀ´¼ÆËãÎÒÃÇÏëÒªµÄÈÕ ......