如题:
哪位大哥能给点事例代码?
using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using System.Data;
using System.Data.OleDb;
public partial class _Default : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
}
protected void select_Click(object sender, EventArgs e)
{
string strConnection="Provider=Microsoft.Jet.OleDb.4.0;";
strConnection+=@"Data Source=E:\temp\testDB.mdb";
OleDbConnection objConnection=new OleDbConnection(strConnection);
objConnection.Open();
objConnection.Close();
txt.Text = "Connection Opened!";
}
}
解决了, 谢谢