把頁面UpdateData
<appSettings>
<add key=
value=
</add>
</appSettings>
由於頁面ShowData
using System
//獲取連接字符串
private readonly string ACCESSCONNECTIONSTRING
=ConfigurationSettings
頁面UpdateData
private void Page_Load(object sender
{
if(!Page
{
ShowDBData(); //顯示數據庫MyFirstAccessDB中的數據
}
}
private void ShowDBData()
{ //設在訪問數據庫的連接字符串
string accessString = ACCESSCONNECTIONSTRING
+ Server
string cmdText =
//創建數據庫的連接和Command
OleDbConnection accessConn = new OleDbConnection(accessString);
OleDbCommand accessComm = new OleDbCommand(cmdText
//定義數據顯示的格式
string dataString =
[
From:http://tw.wingwit.com/Article/program/net/201311/15130.html