![]() |
#2
冰镇柠檬汁儿2011-06-20 10:01
|

public config()
{
}
public static OleDbConnection CreateConnection() //数据库连接
{
OleDbConnection conn = new OleDbConnection(Globals.ConnectionString);
conn.Open();
return conn;
}
public static OleDbDataReader GetReader(string str_Sql)
{
OleDbConnection conn = CreateConnection();
OleDbCommand comm = new OleDbCommand(str_Sql, conn);
OleDbDataReader dr = comm.ExecuteReader(CommandBehavior.CloseConnection);
return dr;
}
{
}
public static OleDbConnection CreateConnection() //数据库连接
{
OleDbConnection conn = new OleDbConnection(Globals.ConnectionString);
conn.Open();
return conn;
}
public static OleDbDataReader GetReader(string str_Sql)
{
OleDbConnection conn = CreateConnection();
OleDbCommand comm = new OleDbCommand(str_Sql, conn);
OleDbDataReader dr = comm.ExecuteReader(CommandBehavior.CloseConnection);
return dr;
}
这个是后台修改数据的。。字数少于1000左右时都不会有问题 字数多了就出这个错