SQL方象垂荷恬窃

2009-05-12 20:47:08来源:未知 阅读 ()

新老客户大回馈,云服务器低至5折

厘委方象垂荷恬窃屁尖阻匯和,万淫根阻械喘議方象垂荷恬,喇眉嶽圭塀:酒汽議SQL憧俊忖憲堪議侘塀,SQL囂鞘聞喘歌方議侘塀才贋刈狛殻議侘塀,耽嶽侘塀譲嗤励倖圭隈,旺拝脅嗤並暦.,辛參岷俊距喘.旗鷹泌和: 

1//======================================================================
 2//
 3//    Copyright (C) 2007-2008 眉埖罷周垢恬片  
 4//    All rights reserved
 5//
 6//    filename :SQLDataBase
 7//    description :
 8//
 9//    created by 作摂 at 04/14/2008 18:33:32
10//    http://houleixx.cnblogs.com
11//
12//======================================================================
13
14using System;
15using System.Collections;
16using System.Collections.Specialized;
17using System.Data;
18using System.Data.SqlClient;
19using System.Configuration;
20using System.Data.Common;
21
22namespace SQLDataBase
23{
24  /**//// <summary>
25  /// 方象恵諒児粥窃(児噐SQLServer)
26  /// </summary>
27  class SQLDataBase
28  {
29    protected static string connectionString = ConfigurationManager.ConnectionStrings["ConnectionString"].ConnectionString;
30    public SQLDataBase()
31    {
32
33    }
34
35    峇佩酒汽SQL囂鞘#region 峇佩酒汽SQL囂鞘
36
37    /**//// <summary>
38    /// 峇佩SQL囂鞘?卦指唹?議芝村方
39    /// </summary>
40    /// <param name="SQLString">SQL囂鞘</param>
41    /// <returns>唹?議芝村方</returns>
42    public int ExecuteSql(string SQLString)
43    {
44      using (SqlConnection connection = new SqlConnection(connectionString))
45      {
46        using (SqlCommand cmd = new SqlCommand(SQLString, connection))
47        {
48          try
49          {
50            connection.Open();
51            int rows = cmd.ExecuteNonQuery();
52            return rows;
53          }
54          catch (System.Data.SqlClient.SqlException E)
55          {
56            connection.Close();
57            throw new Exception(E.Message);
58          }
59        }
60      }
61    }
62
63    /**//// <summary>
64    /// 峇佩謹訳SQL囂鞘?糞?方象垂並暦。
65    /// </summary>
66    /// <param name="SQLStringList">謹訳SQL囂鞘</param>    
67    public void ExecuteSqlTran(ArrayList SQLStringList)
68    {
69      using (SqlConnection conn = new SqlConnection(connectionString))
70      {
71        conn.Open();
72        SqlCommand cmd = new SqlCommand();
73        cmd.Connection = conn;

标签:

版权申明:本站文章部分自网络,如有侵权,请联系:west999com@outlook.com
特别注意:本站所有转载文章言论不代表本站观点,本站所提供的摄影照片,插画,设计作品,如需使用,请与原作者联系,版权归原作者所有

上一篇:用mysql做站点时怎样记录未知错误的发生

下一篇:如何利用SQL Server数据库快照形成报表