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

ͨÓõÄSqlServer²Ù¿ØÀà

 using System;
using System.Collections;
using System.Collections.Specialized;
using System.Data;
using System.Data.SqlClient;
using System.Configuration;
using System.Collections.Generic;


public class CommandInfo
{
public string CommandText;
public SqlParameter[] Parameters;
}
/// <summary>
/// Êý¾Ý·ÃÎʳéÏó»ù´¡Àà
/// </summary>
public abstract class DbHelperSQL
{
//Êý¾Ý¿âÁ¬½Ó×Ö·û´®(web.configÀ´ÅäÖÃ)£¬¿ÉÒÔ¶¯Ì¬¸ü¸ÄconnectionStringÖ§³Ö¶àÊý¾Ý¿â.
public static string connectionString = ConfigurationManager.ConnectionStrings["cnpg_newsConStr"].ToString();


public DbHelperSQL()
{


}
#region ¹«Ó÷½·¨
public static int GetMaxID(string FieldName, string TableName)
{
string strsql = "select max(" + FieldName + ")+1 from " + TableName;
object obj = DbHelperSQL.GetSingle(strsql);
if (obj == null)
{
return 1;
}
else
{
return int.Parse(obj.ToString());
}
}
public static bool Exists(string strSql)
{
object obj = DbHelperSQL.GetSingle(strSql);
int cmdresult;
if ((Object.Equals(obj, null)) || (Object.Equals(obj, System.DBNull.Value)))
{
cmdresult = 0;
}
else
{
cmdresult = int.Parse(obj.ToString());
}
if (cmdresult == 0)
{
return false;
}
else
{
return true;
}
}
/// <summary>
/// ±íÊÇ·ñ´æÔÚ
/// </summary>
/// <param name="TableName"></param>
/// <returns></returns>
public stati


Ïà¹ØÎĵµ£º

sqlserver »¹Ô­µ½Ê±¼äµã

½ñÌìÒ»²»Àä¾²¾Í°ÑsqlserverÊý¾Ý¿â³õʼ»¯ÁË£¬ÔÚÍøÉÏÕÒÁË°ëÌì·¢ÏÖÁ˼¸ÆªÌû×Ó£¬ÊÜÒæ·Çdz£¬¼Ç¼ÏÂ
DB2ÖпÉÒÔʹµÃÊý¾Ý¿â»Ø¸´µ½Ö¸¶¨µÄʱ¼äµã£¬SQL ServerÊý¾Ý¿âµÄRecovery ModelΪfull »òÕßBulk copyµÄʱºò£¬ÊÇ¿ÉÒÔ´ÓÈÕÖ¾À´»Ö¸´Êý¾Ý¿âµÄ¡£Êµ¼ÊÉÏÈÕÖ¾ÖмǼµÄÒ»ÌõÒ»ÌõµÄtransact sqlÓï¾ä£¬»Ö¸´Êý¾Ý¿âµÄʱºò»áredoÕâЩsqlÓï¾ä¡£&nb ......

³õʶSQLSERVER´¥·¢Æ÷(Ò»)


´¥·¢Æ÷ÊÇÒ»ÖÖÌØÊâµÄ´æ´¢¹ý³Ì£¬ÀàËÆÓÚÆäËü±à³ÌÓïÑÔÖеÄʼþº¯Êý£¬SQL Server? ÔÊÐíΪ INSERT¡¢UPDATE¡¢DELETE ´´½¨´¥·¢Æ÷£¬µ±ÔÚ±í£¨ÊÓͼ£©ÖвåÈë¡¢¸üС¢É¾³ý¼Ç¼ʱ£¬´¥·¢Ò»¸ö»òһϵÁÐ T-SQL Óï¾ä¡£
    ±¾×¨ÌâµÄÄ¿µÄ²¢·ÇÊÇÏòÄúÏ꾡µØ½éÉÜ´¥·¢Æ÷£¬¶øÊÇϵͳµØÏòÄú½éÉÜ´¥·¢Æ÷µÄ³£ÓÃ֪ʶÓëÏà¹ØÓ¦Ó㬲¢ÓëÄúÒ ......

SqlserverÓëaccessÊý¾Ý¿âsqlÓ﷨ʮ´ó²îÒì

ÊÀʶ´Ã÷½ÔѧÎÊ£¬ÈËÇéÁ·´ï¼´ÎÄÕ¡£×öASPʱ£¬×î³£ÓõÄÊý¾Ý¿â¼´SqlserverÓëAccessÊý¾Ý¿âĪÊôÁË£¡
µ«Ê¹Óûᾭ³£·¢ÏֺܶàSQLÖ´ÐеÄÎÊÌâ¡£ÕâÀïÕûÀí³öÖ®¼äµÄ²îÒ죬×ö¸öÊ®´ó²îÒìµÄ×ܽᡣ
ACCESS½á¹¹¼òµ¥ÈÝÒ×´¦Àí£¬¶øÇÒÒ²ÄÜÂú×ã¶àÊýµÄÍøÕ¾³ÌÐòÒªÇó£¬Ò²ÊdzõѧÕßµÄÊÔÅ£µ¶¡£
ACCESSÊÇСÐÍÊý¾Ý¿â£¬¼ÈÈ»ÊÇСÐ;ÍÓÐËû¸ù±¾µÄ¾ÖÏÞÐÔ£º
......

ʹÓÃSqlserverÊÂÎñ·¢²¼ÊµÏÖÊý¾Ýͬ²½

      ÊÂÎñµÄ¹¦ÄÜÔÚsqlserverÖÐÓÉÀ´ÒѾã¬ÒòΪ×î½üÔÚ×öÒ»¸öÊý¾Ýͬ²½·½°¸£¬ËùÒÔÓлú»áÔÙ´ÎÑо¿Ò»ÏÂËüÒÔ¼°¿ìÕյȣ¬·¢ÏÖ»¹ÊÇÓкܶ಻´íµÄ¹¦Äܺ͸ĽøµÄ¡£ÕâÀïÒÔsqlserver2008µÄÊÂÎñ·¢²¼¹¦ÄÜΪÀý£¬¶Ô·¢²¼¶©Ôĵķ½Ê½¼òÒª½éÉÜһϲÙ×÷Á÷³Ì£¬Ò»·½Ãæ×ö¸ö×ܽᱸ·Ý£¬Ò»·½ÃæÓë´ó¼Ò½øÐÐһϷÖÏíºÍ½»Á÷¡£·Ñ»°¾Í² ......

SQLserverÖÐÓÃconvertº¯Êýת»»ÈÕÆÚ¸ñʽ

¡¾ÎÊÌâÃèÊö£º¡¿
      Ò»¸öÓû§±íÖеÄ×¢²áÈÕÆÚÏÔʾ¸ñʽÊÇ£ºyyyy-mm-dd Thh:mm:ss.mmm ¡£¶øÎÒÏëͳ¼Æ³öÿÌìµÄÓû§×¢²áÊý£¬Ö±½Ógroup×¢²áÈÕÆÚ×Ö¶ÎÏÔÈ»ÊDz»Ðеġ£
¡¾ÎÊÌâ´¦Àí£º¡¿
      ÀûÓÃSQLserverÖеÄconvertº¯Êý¶ÔÈÕÆÚ½øÐÐת»»×ª»»¡£groupת»»ºóµÄÈÕÆÚ¡£
¡¾½Å  ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ