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

ÅäÖÃSQL Server2005 expressÓëjdbcÁ¬½Ó

ÉÏ΢ÈíÍøÕ¾ÏÂÔØsqlserver2005 jdbc driver °ü
  
  1¡¢½«microsoft sql server 2005 jdbc driver\sqljdbc_1.2\chs\sqljdbc.jar°ü copyµ½·¢²¼ÏµÍ³ µÄ web-inf\libĿ¼ÖÐ
  2¡¢½«microsoft sql server 2005 jdbc driver\sqljdbc_1.2\chs\auth\x86\sqljdbc_auth.dll Îļþcopyµ½ windows\system32Ŀ¼
  
  web-inf\fcconfig.xml ÎļþÖеÄÁ¬½Ó×Ö·û´®ÈçÏÂÉèÖÃ
    <ds name="fhjtest" dbtype="sqlserver" 
   type="jdbc" jdbcdriver="com.microsoft.sqlserver.jdbc.sqlserverdriver" jdbcurl="jdbc:sqlserver://localhost:1433;databasename=wy;integratedsecurity=true;" user="sa" password="small" />  
 ×¢ÖØ£º 
 jdbcdriver="com.microsoft.sqlserver.jdbc.sqlserverdriver"
 jdbcurl="jdbc:sqlserver://localhost:1433;databasename=wy;integratedsecurity=true;"
ÅäÖÃSQL Server2005 expressÓëjdbcÁ¬½Ó
 
 
±¾ÎÄÖ÷Òª½éÉÜÁËÅäÖÃSQL Server2005 expressÓëjdbcÁ¬½ÓµÄÈ«¹ý³Ì¡£
SQL Server2000ϵÄJavaÓ¦ÓÃÄÜ·ñÔÚSQL Server 2005 expressÉÏÔËÐУ¬¾­¹ý²»¶Ï²âÊÔÓëÅäÖã¬×ܽáÒÔϾ­Ñ飺
1£ºÊ×ÏÈÈ·ÈÏSQL Server2005 expressÒѾ­°²×°ºÃÁË¡£
2£ºÆôÓÃTCP/IPЭÒé¡£
ÔÚ“³ÌÐò->Microsoft SQL Server 2005->ÅäÖù¤¾ß->SQL Server ÍâΧӦÓÃÅäÖÃÆ÷”Öдò¿ªTCP/IPЭÒé¡£ÈçÏ£º
ͼ1-1 SQL Server ÍâΧӦÓÃÅäÖÃÆ÷´°¿Ú
Ñ¡Ôñ“·þÎñºÍÁ¬½ÓµÄÍâΧӦÓÃÅäÖÃÆ÷”£¬ÈçÏ£º
ÔÚ“Ô¶³ÌÁ¬½Ó”ÖÐÑ¡Ôñ“ͬʱʹÓÃTCP/IPºÍnamed pipes£¨B£©”,È»ºóµã“Ó¦ÓÔ¡£
3£ºÅäÖÃSQL Server 2005ÖеÄTCP/IPЭÒé
ÔÚ“³ÌÐò->Microsoft SQL Server 2005->ÅäÖù¤¾ß”ÏÂÔËÐГSQL Server Configuration Manager”£¬ÈçÏ£º
ĬÈÏTCP/IPÊôÐÔ,È«²¿ÕìÌýµÄֵΪ“ÊÇ”£¬ÈçÏ£º
ÐÞ¸ÄTCP/IPÊôÐÔ,½«È«²¿ÕìÌý¸ÄΪ“·ñ”
½«TCP¶¯Ì¬¶Ë¿Ú¸ÄΪ¿Õ£¨È÷þÎñÆ÷×Ô¼ºÑ¡Ôñ¶Ë¿Ú£©, TCP¶Ë¿Ú¸ÄΪ1433
ÍƼö£ºÈ»ºóÖØÆô»úÆ÷£¬ÈÃÖØÆô»úÆ÷µÄ¹ý³ÌÖаÑSQL Server 2005 expressÆô¶¯¡£Ò²¿ÉÒÔÖØÐÂÆô¶¯SQL Server2005 express·þÎñ¡£
4£ºÔÚtomcatÖÐÅäÖÃSQL ServerÊý¾Ý¿â³É¹¦¡£
SQL Server 2005 expressÖÐurlºÍdriverClassName¸úSQL Server 2000Óв


Ïà¹ØÎĵµ£º

oracle sql*plus set &spool½éÉÜ(Ò»)

1). ÉèÖõ±Ç°sessionÊÇ·ñ¶ÔÐ޸ĵÄÊý¾Ý½øÐÐ×Ô¶¯Ìá½» :SET AUTO[COMMIT] {ON|OFF|IMM[EDIATE]| n}
SQL> set autocommit off
2)£®ÔÚÓÃstartÃüÁîÖ´ÐÐÒ»¸ösql½Å±¾Ê±£¬ÊÇ·ñÏÔʾ½Å±¾ÖÐÕýÔÚÖ´ÐеÄSQLÓï¾ä :SET ECHO {ON|OFF}
SQL> set echo on
3).ÊÇ·ñÏÔʾµ±Ç°sqlÓï¾ä²éѯ»òÐ޸ĵÄÐÐÊý
SQL> SET FEED[BACK] {6|n|O ......

oracle ³£ÓÃÐÔÄܲéѯSQL·ÖÏí

select count(1) from dictionary;
select * from dba_data_files;
select count(1) from dba_objects t where t.owner='BESTTONE';
select * from dba_tablespaces t where t.tablespace_name='BESTTONE';
select count(1) from dba_tables t where t.owner='BESTTONE';
select t.table_name,t.comments from diction ......

oracle sql*plus set &spool½éÉÜ(¶þ)

Oracle spool Ó÷¨Ð¡½á[°ëת°ë¼Ó]
¹ØÓÚSPOOL(SPOOLÊÇSQLPLUSµÄÃüÁ²»ÊÇSQLÓï·¨ÀïÃæµÄ¶«Î÷¡£)
¶ÔÓÚSPOOLÊý¾ÝµÄSQL£¬×îºÃÒª×Ô¼º¶¨Òå¸ñʽ£¬ÒÔ·½±ã³ÌÐòÖ±½Óµ¼Èë,SQLÓï¾äÈ磺
select empno||','||ename||','||sal from emp;
spool³£ÓõÄÉèÖÃ
set colsep' ';¡¡¡¡¡¡ //ÓòÊä³ö·Ö¸ô·û
set echo off;¡¡¡¡¡¡¡¡//ÏÔʾstartÆô¶¯µ ......

N ²ãÓ¦ÓóÌÐòÖеÄÊý¾Ý¼ìË÷ºÍ CUD ²Ù×÷ (LINQ to SQL)

http://msdn.microsoft.com/zh-cn/library/bb546187.aspx
http://www.cnblogs.com/kirinboy/archive/2010/01/20/linq-to-sql-update-1.html
¡¾ÒýÎÄ¡¿
ÔÚѧϰLINQʱ£¬ÎÒ¼¸ºõ±»Ò»¸öÀ§ÄÑËù»÷µ¹£¬Õâ¾ÍÊÇÄã´Ó±êÌâÖп´µ½µÄ¸üÐÂÊý¾Ý¿âµÄ²Ù×÷¡£ÏÂÃæÎÒ¾ÍÒ»²½²½´øÄã×ßÈëÕâÄà̶£¬Çë×¼±¸ºÃשͷºÍ¿ÚË®£¬Follow me¡£
´Ó×î¼òµ¥µÄÇé¿öÈë ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ