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

asp.netÁ¬½ÓSQL ºÍACCESSÊý¾Ý¿â

ASP.NETÈçºÎÁ¬½ÓAccess»òSQL ServerÊý¾Ý¿â 
Ê×ÏÈ¿´Ò»¸öÀý×Ó´úÂëƬ¶Ï:
³ÌÐò´úÂë: 
--------------------------------------------------------------------------------
using System.Data;
using System.Data.OleDb;
......
string strConnection="Provider=Microsoft.Jet.OleDb.4.0;";
strConnection+=@"Data Source=C:\BegASPNET\Northwind.mdb";
OleDbConnection objConnection=new OleDbConnection(strConnection);
......
objConnection.Open();
objConnection.Close();
......
 
--------------------------------------------------------------------------------
½âÊÍ:
¡¡Á¬½ÓAccessÊý¾Ý¿âÐèÒªµ¼Èë¶îÍâµÄÃüÃû¿Õ¼ä,ËùÒÔÓÐÁË×îÇ°ÃæµÄÁ½ÌõusingÃüÁî,ÕâÊDZز»¿ÉÉÙµÄ!
¡¡strConnectionÕâ¸ö±äÁ¿Àï´æ·ÅµÄÊÇÁ¬½ÓÊý¾Ý¿âËùÐèÒªµÄÁ¬½Ó×Ö·û´®,ËûÖ¸¶¨ÁËҪʹÓõÄÊý¾ÝÌṩÕߺÍҪʹÓõÄÊý¾ÝÔ´.
¡¡"Provider=Microsoft.Jet.OleDb.4.0;"ÊÇÖ¸Êý¾ÝÌṩÕß,ÕâÀïʹÓõÄÊÇMicrosoft JetÒýÇæ,Ò²¾ÍÊÇAccessÖеÄÊý¾ÝÒýÇæ,asp.net¾ÍÊÇ¿¿Õâ¸öºÍAccessµÄÊý¾Ý¿âÁ¬½ÓµÄ. 
¡¡"Data Source=C:\BegASPNET\Northwind.mdb"ÊÇÖ¸Ã÷Êý¾ÝÔ´µÄλÖÃ,ËûµÄ±ê×¼ÐÎʽÊÇ"Data Source=MyDrive:MyPath\MyFile.MDB".
ps:
¡¡1."+="ºóÃæµÄ"@"·ûºÅÊÇ·ÀÖ¹½«ºóÃæ×Ö·û´®ÖеÄ"\"½âÎöΪתÒå×Ö·û.
¡¡2.Èç¹ûÒªÁ¬½ÓµÄÊý¾Ý¿âÎļþºÍµ±Ç°ÎļþÔÚͬһ¸öĿ¼ÏÂ,»¹¿ÉÒÔʹÓÃÈçϵķ½·¨Á¬½Ó:
¡¡¡¡strConnection+="Data Source=";
¡¡¡¡strConnection+=MapPath("Northwind.mdb");
¡¡¡¡ÕâÑù¾Í¿ÉÒÔÊ¡µÃÄãдһ´ó¶Ñ¶«Î÷ÁË!
¡¡3.ҪעÒâÁ¬½Ó×Ö·û´®ÖеIJÎÊýÖ®¼äÒªÓ÷ֺÅÀ´·Ö¸ô.
¡¡"OleDbConnection objConnection=new OleDbConnection(strConnection);"ÕâÒ»¾äÊÇÀûÓö¨ÒåºÃµÄÁ¬½Ó×Ö·û´®À´½¨Á¢ÁËÒ»¸öÁ´½Ó¶ÔÏó,ÒÔºó¶ÔÊý¾Ý¿âµÄ²Ù×÷ÎÒÃǶ¼ÒªºÍÕâ¸ö¶ÔÏó´ò½»µÀ.
¡¡"objConnection.Open();"ÕâÓÃÀ´´ò¿ªÁ¬½Ó.ÖÁ´Ë,ÓëAccessÊý¾Ý¿âµÄÁ¬½ÓÍê³É.ÆäÓà²Ù×÷(²åÈë,ɾ³ý...)Çë²ÎÔÄÏà¹ØÊé¼®
 
Á¬½ÓSQL Server
Àý×Ó´úÂëƬ¶Ï:
³ÌÐò´úÂë: 
-------------------------------------------------------------------------------- 
ÍøÒ³½ÌѧÍø
using System.Data;
using System.Data.SqlClient;
...
string strConnection="user id=sa;password=;";
strConnection+="initial catalog=Northwind;Server=YourSQLServer;";
strConnection+="Connect Timeout=30";
SqlConne


Ïà¹ØÎĵµ£º

Oracle Sql ÓÅ»¯


»ù±¾µÄSql±àдעÒâÊÂÏî
¾¡Á¿ÉÙÓÃIN²Ù×÷·û£¬»ù±¾ÉÏËùÓеÄIN²Ù×÷·û¶¼¿ÉÒÔÓÃEXISTS´úÌæ¡£
²»ÓÃNOT IN²Ù×÷·û£¬¿ÉÒÔÓÃNOT EXISTS»òÕßÍâÁ¬½Ó+Ìæ´ú¡£
OracleÔÚÖ´ÐÐIN×Ó²éѯʱ£¬Ê×ÏÈÖ´ÐÐ×Ó²éѯ£¬½«²éѯ½á¹û·ÅÈëÁÙʱ±íÔÙÖ´ÐÐÖ÷²éѯ¡£¶øEXISTÔòÊÇÊ×Ïȼì²éÖ÷²éѯ£¬È»ºóÔËÐÐ×Ó²éѯֱµ½ÕÒµ½
µÚÒ»¸öÆ¥ÅäÏî¡£NOT EXISTS±ÈNOT INЧÂÊÉ ......

tempdb¶ÔSQL ServerÊý¾Ý¿âÐÔÄÜÓкÎÓ°Ïì

tempdb¶ÔSQL ServerÊý¾Ý¿âÐÔÄÜÓкÎÓ°Ïì
 
±¾ÎĹؼü´Ê£ºSQL Server ÍøÂç
Ïà·´Èç¹û·ÃÎʺÜƵ·±,loading¾Í»á¼ÓÖØ,tempdbµÄÐÔÄܾͻá¶ÔÕû¸öDB²úÉúÖØÒªµÄÓ°Ïì.ÓÅ»¯tempdbµÄÐÔÄܱäµÄºÜÖØÒªµÄ,ÓÈÆä¶ÔÓÚ´óÐÍÊý¾Ý¿â.Èç¹ûʹÓÃÁÙʱ±í´¢´æ´óÁ¿µÄÊý¾ÝÇÒƵ·±·ÃÎÊ,¿¼ÂÇÌí¼ÓindexÒÔÔö¼Ó²éѯЧÂÊ.
¡¡  1.SQL ServerϵͳÊý¾Ý¿â½é ......

SQL Server 2008¼¸ÏîÐÂÌØÐÔ¸ÅÊö

¼Æ»®ÓÚ2008ÄêµÚÒ»¼¾¶È·¢²¼µÄSQL Server 2008²»½ö¶ÔÔ­ÓÐÐÔÄܽøÐÐÁ˸Ľø£¬»¹Ìí¼ÓÁËÐí¶àÐÂÌØÐÔ£¬±ÈÈçÐÂÌíÁËÊý¾Ý¼¯³É¹¦ÄÜ£¬¸Ä½øÁË·ÖÎö·þÎñ£¬±¨¸æ·þÎñ£¬ÒÔ¼°Office¼¯³ÉµÈµÈ¡£
¡¡¡¡SQL Server¼¯³É·þÎñ
¡¡¡¡SSIS(SQL Server¼¯³É·þÎñ)ÊÇÒ»¸öǶÈëʽӦÓóÌÐò£¬ÓÃÓÚ¿ª·¢ºÍÖ´ÐÐETL(½âѹËõ¡¢×ª»»ºÍ¼ÓÔØ)°ü¡£SSIS´úÌæÁËSQL 2000µÄDTS¡£Õ ......

SQL Server2008ÐÐÊý¾ÝºÍÒ³Êý¾ÝѹËõ½âÃÜ

SQL Server2008ÐÐÊý¾ÝºÍÒ³Êý¾ÝѹËõ½âÃÜ
 
Êý¾ÝѹËõÒâζ׿õСÊý¾ÝµÄÓдÅÅÌÕ¼ÓÃÁ¿£¬ËùÒÔÊý¾ÝѹËõ¿ÉÒÔÓÃÔÚ±í£¬¾Û¼¯Ë÷Òý£¬·Ç¾Û¼¯Ë÷Òý£¬ÊÓͼË÷Òý»òÊÇ·ÖÇø±í£¬·ÖÇøË÷ÒýÉÏ¡£2.Ç°±êѹËõ£ºÃ¿Ò»Ò³ÖеÄËùÓÐÁУ¬ÔÚÐбêÍ·ÏÂÃ棬ÿÐж¼´æ´¢×ÅÒ»¸öÐж¨ÒåÖµ£¬Ñ¹Ëõºó£¬ËùÓÐÐеĶ¨ÒåÖµ¶¼±»Ìæ»»³ÉÐÐÍ·ÖµµÄÒýÓá£
¡¡¡¡±¾ÎĽ«Îª´ó¼Ò½éÉÜ ......

SQL º¯Êý

1:replace º¯Êý
µÚÒ»¸ö²ÎÊýÄãµÄ×Ö·û´®£¬µÚ¶þ¸ö²ÎÊýÄãÏëÌæ»»µÄ²¿·Ö£¬µÚÈý¸ö²ÎÊýÄãÒªÌæ»»³Éʲô
select replace('lihan','a','b')

-----------------------------
lihbn
£¨ËùÓ°ÏìµÄÐÐÊýΪ 1 ÐУ©
============================================== ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ