用oracleconnection連線oracle
在web.config中配置 "oracle
"value=
"data source=***;user id=***;password=***
"/>
public system.data.oracleclient.oracleconnection cnn;
///
/// 開啟資料庫連線
///
public void open()
///
/// 開啟資料庫連線,返回cnn
///
public oracleconnection opencnn()
///
/// 關閉資料庫連線
///
public void close()
///
/// 返回dataset
///
/// "cmdstring
">
/// "tablename
">
///
public dataset getdataset(string cmdstring,string tablename)
///
/// 返回oledbdatareader
///
/// "cmdstring
">
///
public oracledatareader getdatareader(string cmdstring)
///
/// 返回影響資料庫的行數
///
/// "cmdstring
">
///
public int executesql(string cmdstring)
///
/// 邦定drodownlist
///
/// "drodlist
">控制項名
/// "sql
">連線字串
/// "tablename
">表名
/// "datatextfd
">提供文字內容的資料來源字段
/// "data
valuefd
">為列表項提供值的資料來源字段
public void drolist(dropdownlist drodlist,string sql,string tablename,string datatextfd,string data
valuefd)
catch(exception e)
finally
}
C 操作ORACLE資料庫
using system using system.data using system.configuration using system.linq using system.web using system.web.security using system.web.ui using syste...
c 資料庫操作類
using system using system.data using system.configuration using system.web using system.web.security using system.web.ui using system.web.ui.webcontro...
C 資料庫操作類
using system using system.collections.generic using system.linq using system.web using system.data.oledb using system.data using system.configuration ...