日期:2014-05-17 浏览次数:21091 次
private void button9_Click(object sender, EventArgs e)
{
textBox1.Text = fileDir();
OleDbConnection mycon = null;
try
{
string strcon = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=1.mdb;";
mycon = new OleDbConnection(strcon);
mycon.Open();
string sql = "update dir set dir.filedir = " + textBox1.Text + "";
OleDbDataAdapter ad = new OleDbDataAdapter(sql, strcon);
DataTable dt = new DataTable();
ad.Fill(dt);
}
finally
{
mycon.Close();
}
}