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

ASP.NETÁ¬½ÓSQLºÍACCESSµÄ·½·¨

SQL:
using System.Data.SqlClient;
string sql = "server=.;uid=sa;pwd=;database=tablename;";
ACCESS:
using System.Data.OleDb;
string sql = "PROVIDER=Microsoft.Jet.OLEDB.4.0;DATA Source=" + HttpRuntime.AppDomainAppPath + "//App_Data//db.mdb";
HttpRuntime.AppDomainAppPath Ϊ¸ùĿ¼


Ïà¹ØÎĵµ£º

ÔÚSQL ServerÖÐÈçºÎÊä³öÐкÅ


Ô­ÎĵØÖ·£ºhttp://www.dingos.cn/index.php?topic=1688.0
OracleÓÐrownumÓÃÓÚ·ÃÎʱíÖÐÐкš£ÄÇôÔÚSQL ServerÖÐÊÇ·ñÓеÈЧµÄÄØ£¿»òÕßÔÚSQL ServerÖÐÈçºÎÊä³öÐкţ¿
-----------------------------------
ÔÚSQL ServerÖÐûÓÐÖ±½ÓµÈЧÓÚOracleµÄrownum
-----------------------------------
Ñϸñ˵À´£¬ÔÚ¹ØϵÊý¾Ý¿âÖУ ......

Orcale µÄSQL Óï¾äÈ¡µÃϵͳµ±Ç°Ê±¼äÓãºsysdate

Orcale µÄSQL Óï¾äÈ¡µÃϵͳµ±Ç°Ê±¼äÓãºsysdate
    µ±ÐèÒªÔÚϵͳµ±Ç°ÈÕÆÚÉϼõÈ¥Ò»Ììʱ¿ÉÒÔÓà  sysdate-1
     ¸½£ºµ±Ö»¶ÔÒ»¶¨ÊýÁ¿µÄ¼Ç¼¸ÐÐËȤʱ¿ÉÒÔÈç rownum<100
select * from SLYC_CUSTINFO_T where indbtime>sysdate-1 and OFFICE_CODE='46' and rownum<1 ......

SQL server´¥·¢Æ÷ÈëÃÅ2 ÖØÃüÃû´¥·¢Æ÷

1.Óòéѯ·ÖÎöÆ÷ÖØÃüÃû
exec sp_rename Ô­Ãû³Æ, ÐÂÃû³Æ
sp_rename ÊÇ SQL Server™ ×Ô´øµÄÒ»¸ö´æ´¢¹ý³Ì£¬ÓÃÓÚ¸ü¸Äµ±Ç°Êý¾Ý¿âÖÐÓû§´´½¨µÄ¶ÔÏóµÄÃû³Æ£¬Èç±íÃû¡¢ÁÐ±í¡¢Ë÷ÒýÃûµÈ¡£
2.ÓÃÆóÒµ¹ÜÀíÆ÷ÖØÃüÃû
ÔÚ±íÉϵãÓÒ¼ü->“ËùÓÐÈÎÎñ”->“¹ÜÀí´¥·¢Æ÷”£¬Ñ¡ÖÐËùÒªÖØÃüÃûµÄ´¥·¢Æ÷£¬Ð޸Ĵ¥·¢Æ÷Óï ......

SQL Express×Ô¶¯±¸·Ý

--µÚÒ»²½
--ÔÚmaster¿âÖн¨Á¢Ò»¸ö±¸·ÝÊý¾Ý¿âµÄ´æ´¢¹ý³Ì.
USE master
GO
CREATE PROC p
      @db_name sysname,         --Êý¾Ý¿âÃû
      @bk_path NVARCHAR(1024)     --±¸·ÝÎļþµÄ·¾¶
 A ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ