Ò׽ؽØͼÈí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö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 ´óÐÍÊý¾Ý´¦ÀíÓëÓÅ»¯

Ò»¡¢Êý¾Ý¿â½á¹¹µÄÉè¼Æ
    Èç¹û²»ÄÜÉè¼ÆÒ»¸öºÏÀíµÄÊý¾Ý¿âÄ£ÐÍ£¬²»½ö»áÔö¼Ó¿Í»§¶ËºÍ·þÎñÆ÷¶Î³ÌÐòµÄ±à³ÌºÍά»¤µÄÄѶȣ¬¶øÇÒ½«»áÓ°Ïìϵͳʵ¼ÊÔËÐеÄÐÔÄÜ¡£ËùÒÔ£¬ÔÚÒ»¸öϵͳ¿ªÊ¼ÊµÊ©Ö®Ç°£¬Í걸µÄÊý¾Ý¿âÄ£Ð͵ÄÉè¼ÆÊDZØÐëµÄ¡£
    ÔÚÒ»¸öϵͳ·ÖÎö¡¢Éè¼Æ½×¶Î£¬ÒòΪÊý¾ÝÁ¿½ÏС£¬¸ººÉ½ÏµÍ¡£ÎÒÃÇÍùÍù ......

WindowsÏÂSQLServerµÄ¼¯ÈºÅäÖÃ

»ù±¾ÅäÖÃ
Ò»¡¢ÎļþϵͳҪÇó£º
1¡¢ÖÁÉÙÓжþ¸ö·ÖÇø£»
2¡¢ÏµÍ³·ÖÇø²»Ð¡ÓÚ10G£»
3¡¢·ÖÇø¸ñʽ±ØÐëÊÇNTFS¡£
¶þ¡¢²¹¶¡°²×°ÒªÇó£º
1¡¢ÏÈ°²×°Íê±ÏWINDOWS 2000 SP4+³å»÷²¨+Õðµ´²¨²¹¶¡£»
2¡¢½«WINDOWS 2000²¹¶¡Éý¼¶µ½×îкó²Å¿É°²×°cluster ºÍSQL Server£»
3¡¢SQL Server²¹¶¡ÐèÉý¼¶µ½Service Pack 3¡£
Èý¡¢ClusterÐÅÏ¢£º
1£ ......

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

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

SQLServerµ¼³ö±íµ½EXCELÎļþµÄ´æ´¢¹ý³Ì

 SQL Serverµ¼³ö±íµ½EXCELÎļþµÄ´æ´¢¹ý³Ì:
¡¡¡¡*--Êý¾Ýµ¼³öEXCEL
¡¡¡¡µ¼³ö±íÖеÄÊý¾Ýµ½Excel,°üº¬×Ö¶ÎÃû,ÎļþΪÕæÕýµÄExcelÎļþ
¡¡¡¡,Èç¹ûÎļþ²»´æÔÚ,½«×Ô¶¯´´½¨Îļþ
¡¡¡¡,Èç¹û±í²»´æÔÚ,½«×Ô¶¯´´½¨±í
¡¡¡¡»ùÓÚͨÓÃÐÔ¿¼ÂÇ,½öÖ§³Öµ¼³ö±ê×¼Êý¾ÝÀàÐÍ
¡¡¡¡---*/
¡¡¡¡/**//*--µ÷ÓÃʾÀý
¡¡¡¡p_exporttb @tbname='µØÇø ......

MS SqlserverÊÓͼÇÉÓÃ

 1¡¢´´½¨Êý¾Ý¿âtestdb
 2¡¢´´½¨±ítest
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[test](
 [id] [nchar](10) COLLATE Chinese_PRC_CI_AS NULL,
 [name] [nchar](10) COLLATE Chinese_PRC_CI_AS NULL,
 [sex] [bit] NULL
) ON [PRIMARY]
3¡¢´´½¨Êý¾Ý¿âdb ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ