LinkDataBase.cs
(开头部分) 1KB这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。
using System;
using System.Data;
using System.Data.OleDb;
using System.IO;
using System.Web;
namespace 翼希可爱留言本
{
/// <summary>
/// LinkDataBase 的摘要说明。
/// </summary>
/// //该源码下载自www.51aspx.com(51aspx.com)
public class LinkDataBase
{
private string strSQL;
private string connectionString = "Provider=Microsoft.Jet.OLEDB.4.0; Data Source=" + HttpContext.Current.Server.MapPath("DB_51aspx/data.mdb");
private OleDbConnection myConnection;
private OleDbCommandBuilder sqlCmdBld;
private DataSet ds = new DataSet();
private OleDbDataAdapter da;
public LinkDataBase()
{
//
// TODO: 在此处添加构造函数逻辑
//
}
public DataSet SelectDataBase(string tempStrSQL,string tempTableName)
{
this.strSQL = tempStrSQL;
this.myConnection = new OleDbConnection(connectionString);
this.da = new OleDbDataAdapter(this.strSQL,this.myConnection);
this.ds.Clear();
this.da.Fill(ds,tempTableName);
return ds;
}
public DataSet UpdateDataBase(DataSet changedDataSet,string tableName)
{
this.myConnection = new OleDbConnection(connectionString);
this.da = new OleDbDataAdapter(this.strSQL,this.myConnection);
this.sqlCmdBld = new OleDbCommandBuilder(da);
this.da.Update(changedDataSet,tableName);
return changedDataSet;
}
public DataTable SelectDataBase(string tempStrSQL)
{
this.myConnection = new OleDbConnection(connectionString);
DataSet tempDataSet = new DataSet();
this.da = new OleDbDataAdapter(tempStrSQL,this.myConnection);
this.da.Fill(tempDataSet);
return tempDataSet.Tables[0];
}
public int UpdateDataBase(string tempStrSQL)
{
this.myConnection = new OleDbConnection(connectionString);
myConnection.Open();
OleDbCommand tempSqlCommand = new OleDbCommand(tempStrSQL,this.myConnection);
int intNumder = tempSqlCommand.ExecuteNonQuery();
myConnection.Close();
return intNumder;
后面还有 3 行代码,解锁后查看完整代码
24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明
AI 解读 AI
登录后可用,每次 10 算力,解读结果公开显示在下面。
还没有人解读过这个文件。