我把数据库操作类整理了一下,它包含了常用的数据库操作,由三种方式:简单的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
14
using System;
15
using System.Collections;
16
using System.Collections.Specialized;
17
using System.Data;
18
using System.Data.SqlClient;
19
using System.Configuration;
20
using System.Data.Common;
21
22
namespace SQLDataBase
23![]()
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23