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

javaÖÐʹÓÃjdbcÁ¬½Ósql server 2005

×¼±¸¹¤×÷
Ê×ÏÈ£¬²Ù×÷ϵͳÖа²×°ºÃSQL Server 2000/2005£¬Èç¹ûϵͳÖж¼×°ÓÐ2000ºÍ2005°æ£¬¼ÇµÃÍ£ÓÃÒ»¸ö£¬Ö»¿ªÒ»¸öÐÐÁË¡£
È»ºó£¬µ½Î¢ÈíÍøÕ¾ÏÂÔØMicrosoft SQL Server 2005 JDBC Driver 1.1
£¬Ò²¿ÉÒÔʹÓÃÕâ¸öµØÖ·Ö±½ÓÏÂÔØ
¡£
½âѹsqljdbc_1.1.1501.101_chs.exe£¬°Ñsqljdbc_1.1¸´ÖƵ½%ProgramFiles%£¨Èç¹ûϵͳÔÚCÅÌÔòΪC:\Program Files£©¡£
½«C:\Program Files\Microsoft SQL Server 2005 JDBC Driver\sqljdbc_1.2\enu\auth\x64
sqljdbc_auth.dll
¸´ÖƵ½D:\program files\Microsoft SQL Server\MSSQL\Binn
ÏÂÃæ¡£·ñÔò»á±§com.microsoft.sqlserver.jdbc.AuthenticationJNI <clinit>
¾¯¸æ: Failed to load the sqljdbc_auth.dll
ÉèÖÃ Classpath
JDBC Çý¶¯³ÌÐò²¢Î´°üº¬ÔÚ Java SDK ÖС£Òò´Ë£¬Èç¹ûҪʹÓøÃÇý¶¯³ÌÐò£¬±ØÐ뽫 classpath ÉèÖÃΪ°üº¬ sqljdbc.jar Îļþ¡£Èç¹û classpath ȱÉÙ sqljdbc.jar ÏӦÓóÌÐò½«Òý·¢“ÕÒ²»µ½Àà”µÄ³£¼ûÒì³£¡£
sqljdbc.jar ÎļþµÄ°²×°Î»ÖÃÈçÏ£º
<°²×°Ä¿Â¼
>\sqljdbc_<°æ±¾
>\<ÓïÑÔ
>\sqljdbc.jar
ÏÂÃæÊÇÓÃÓÚ Windows Ó¦ÓóÌÐòµÄ CLASSPATH Óï¾äʵÀý£º
CLASSPATH =.;
%ProgramFiles%\sqljdbc_1.1\chs\sqljdbc.jar
ÏÂÃæÊÇÓÃÓÚ Unix/Linux Ó¦ÓóÌÐòµÄ CLASSPATH Óï¾äʵÀý£º
CLASSPATH =.:/home/usr1/mssqlserver2005jdbc/Driver/sqljdbc_1.1/chs/sqljdbc.jar
×¢Ò⣺
ÔÚ Window ϵͳÖУ¬Èç¹ûĿ¼Ãû³¤ÓÚ 8.3 »òÎļþ¼ÐÃûÖаüº¬¿Õ¸ñ£¬½«µ¼Ö classpath ³öÏÖÎÊÌâ¡£Èç¹û»³ÒÉ´æÔÚÕâÀàÎÊÌ⣬ӦÔÝʱ½« sqljdbc.jar ÎļþÒÆ¶¯µ½Ãû³Æ¼òµ¥µÄĿ¼ÖУ¬ÀýÈç C:\Temp
£¬¸ü¸Ä classpath£¬È»ºó²âÊÔÕâÑùÊÇ·ñ½â¾öÁËÎÊÌâ¡£
Ö±½ÓÔÚÃüÁîÌáʾ·ûÔËÐеÄÓ¦ÓóÌÐò
ÔÚ²Ù×÷ϵͳÖÐÅäÖà classpath¡£½« sqljdbc.jar ×·¼Óµ½ÏµÍ³µÄ classpath ÖС£»òÕߣ¬Ê¹Óà java -classpath
Ñ¡Ï¿ÉÒÔÔÚÔËÐдËÓ¦ÓóÌÐòµÄ Java ÃüÁîÐÐÉÏÖ¸¶¨ classpath¡£
ÉèÖÃSQL Server·þÎñÆ÷
ÎÒʹÓõÄÊÇSQL Server 2005±ê×¼°æSP2£¬ÕâЩ¶¼Ä¬Èϼ´¿É£¬Ò»°ã²»ÓÃÅäÖá£Èç¹ûÐèÒªÅäÖö˿ÚÇë¿´ÏÂÃæ¡£
1¡¢“¿ªÊ¼”→“³ÌÐò”→“Microsoft SQL Server 2005”→“ÅäÖù¤¾ß”→“SQL Server ÅäÖùÜÀíÆ÷”→“SQL Server 2005 ÍøÂçÅäÖÔ→“MSSQLSERVER µÄЭÒé”
2¡¢Èç¹û“TCP/IP”ûÓÐÆôÓã¬ÓÒ¼üµ¥»÷Ñ¡Ôñ“Æô¶¯&r


Ïà¹ØÎĵµ£º

sqlÏÈÅÅÐòºó·Ö×éµÄʵÏÖ

ÓÐÕâÑùÒ»¸öÊý¾Ý¿â±í  
  t1             t2           t3……n  
  --------------------------  
  aaa      ......

SQL Server 2000 Êý¾Ý¿âͬ²½

ÎÄÕÂÀ´Ô´£ºhttp://blog.sina.com.cn/s/blog_537ca30d0100bvja.html
ΪʲôҪͬ²½SQL Server 2000 Êý¾Ý¿â£¬Ëü¶¼ÓÃÔÚʲô³¡ºÏ
Êý¾Ýʵʱ±¸·Ýͬ²½£¬Êý¾Ý¿â·þÎñÆ÷³öÎÊÌâʱÎÒÃÇÒ²ÓÐÆäÕý³£¹¤×÷ʱµÄ±¸·Ý
Êý¾Ýʵʱ±¸·Ýͬ²½£¬Ò»Ì¨·þÎñÆ÷¸ºÔز»Æðʱ£¬¿ÉÒÔÓÃÀ´×ö¸ºÔؾùºâ
Êý¾Ýʵʱ±¸·Ýͬ²½£¬Êý¾Ý¿â·þÎñÆ÷¿ÉÒÔÎÞ¼ä¶Ï£¬ÎÞËðÊ§Ç¨ÒÆ ......

ÔÚSql Server Öе÷ÓÃJmail×é¼þ·¢ËÍÓʼþ


 ÔÚSql Server Öе÷ÓÃJmail×é¼þ·¢ËÍÓʼþ
Ô¤±¸ÖªÊ¶
    1£®OLE×Ô¶¯»¯º¯Êý
    OLE×Ô¶¯»¯Ê¹Ó¦ÓóÌÐòÄܹ»¶ÔÁíÒ»¸öÓ¦ÓóÌÐòÖÐʵÏֵĶÔÏó½øÐвÙ×÷£¬»òÕß½«¶ÔÏ󹫿ªÒÔ±ã¿ÉÒÔ¶ÔÆä½øÐвÙ×÷¡£×Ô¶¯»¯¿Í»§¶ËÊǿɶÔÊôÓÚÁíÒ»¸öÓ¦ÓóÌÐòµÄ¹«¿ª¶ÔÏó½øÐвÙ×÷µÄÓ¦ÓóÌÐò£¬±¾ÎÄÖµµÃÊÇSql Server¡£¹«¿ ......

ÔÚXMLÀïдSQLÓï¾ä£¨°ÑSQLÓï¾äд½øXMLÀ

ÄãÖªµÀXMLÎļþ°É£¿£¨²»ÖªµÀµÄGOOGLEÈ¥£¡£©ÄÇÄãÌý˵¹ýÔÚXMLÀïÊéдSQLÓï¾äÂ𣿻»¾ä»°Ëµ£¬°ÑÄãµÄÏîÄ¿ÀïËùÓÐSQLÓï¾ä´æ´¢ÔÚXMLÎļþÀÄãÌý˵¹ýÂð£¿Äã×ö¹ýÂð£¿
ÎÒÍ·´ÎÌý˵ÊÇС°¬¸æËßÎҵģ¬ÎҸҿ϶¨ËûÊǸöÕâ·½ÃæµÄ¸ßÊÖ£¬ºÇºÇ£¨ÔÞÒ»¸ö£¬µ½´ËΪֹ£¡£©
ÄǸøÄãչʾһÏ£¬ÔÚXMLÀïÊéдSQLÓï¾ä°É
<commands>
  <comman ......

sqlǶÌײéѯ

select * from sq_donglong.achi_news where ID in (select ID from (select top 6 ID from sq_donglong.achi_news where SortID=82)a union all select ID from (select top 6 ID from sq_donglong.achi_news where SortID=84)b)
......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØÍ¼ | ¸ÓICP±¸09004571ºÅ