dbhelper類
using system;
using system.collections.generic;
using system.linq;
using system.text;
using system.configuration;
using system.data;
using system.data.common;
using system.data.oracleclient;
using system.data.sqlclient;
namespace dataaccess
private dbconnection createconnection()
public int executenonquery(string sql)}}
public object executescalar(string sql)}}
public dbdatareader executereader(string sql)
}public dataset getdataset(string sql)
if (this._dbprovide***ctory is oracleclientfactory)
return ds;}}
}dataaccessbase類
using system;
using system.collections.generic;
using system.linq;
using system.text;
namespace dataaccess}}
}webconfig註冊
操作例子
public datatable getusers()
運算元據庫幫助類
1 sqlserver public class sqlhelper else if connection.state system.data.connectionstate.closed else if connection.state system.data.connectionstate.br...
運算元據庫的乙個類
code using system using system.data using system.configuration using system.web using system.web.security using system.web.ui using system.web.ui.webc...
用於運算元據庫的通用模組
在開發過程中有大量涉及到與資料庫相關的操作,為了便於開發和維護,把這些操作封裝成類,實現 復用原則。using system using system.collections.generic using system.text using system.data.sqlclient using sy...