public string nnectionString(string configConnectionStringsName
從web
DataOperate 類
構造函數 public DataOperate(string provider
方法
public int excuteCommand(string str)
執行sql語句
public int excuteCommand(string str
執行sql語句
public void excuteCommand(string str
執行sql語句
public DataSet getDataset(string str
執行SQL語句
public IDataReader getDataReader(string str)
執行SQL語句
public IDataReader getDataReader(string str
執行SQL語句
public void Close()
關閉與數據庫的連接
public void Open()
打開數據庫連接
例子
using System;
using System
using System
using System
using System
using System
using CommDataOperate;
public partial class Default
{
protected void Page_Load(object sender
{
string provider;
string con=nnectionString(
DataOperate data = new DataOperate(provider
data
GridView
GridView
data
}
}
From:http://tw.wingwit.com/Article/program/net/201311/13973.html